Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fanout
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gerhard Gonter
fanout
Commits
6afc056f
Commit
6afc056f
authored
11 years ago
by
Guillaume Bour
Browse files
Options
Downloads
Patches
Plain Diff
init.d start/stop script for debian
parent
b11b0529
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Makefile
+7
-0
7 additions, 0 deletions
Makefile
debian/fanout.default
+5
-0
5 additions, 0 deletions
debian/fanout.default
debian/fanout.init
+72
-0
72 additions, 0 deletions
debian/fanout.init
with
84 additions
and
0 deletions
Makefile
+
7
−
0
View file @
6afc056f
...
...
@@ -10,6 +10,13 @@ LFLAGS = -Wall $(DEBUG)
fanout
:
fanout.c
$(
CC
)
$(
LFLAGS
)
$(
OBJS
)
-o
$(
PROJ
)
fanout.c
debian-install
:
-
groupadd
-f
fanout
-
useradd
-g
fanout
-d
/var/run/fanout
-m
-s
/bin/false fanout
cp
fanout /usr/local/bin
cp
debian/fanout.init /etc/init.d/fanout
cp
debian/fanout.default /etc/default/fanout
clean
:
\r
m fanout
This diff is collapsed.
Click to expand it.
debian/fanout.default
0 → 100644
+
5
−
0
View file @
6afc056f
# Default settings for fanout server
# Options to pass to fanout
FANOUT_OPTS="--daemon --pidfile=/var/run/fanout.pid --run-as=fanout:fanout --logfile=/var/log/fanout.log --debug-level=2"
This diff is collapsed.
Click to expand it.
debian/fanout.init
0 → 100755
+
72
−
0
View file @
6afc056f
#! /bin/sh
### BEGIN INIT INFO
# Provides: fanout
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: Fanout SparkleShare pubsub server
### END INIT INFO
set
-e
SERVICE
=
fanout
DAEMON
=
/usr/local/bin/
$SERVICE
PIDFILE
=
/var/run/
$SERVICE
.pid
test
-x
$DAEMON
||
exit
0
umask
022
if
test
-f
/etc/default/
$SERVICE
;
then
.
/etc/default/
$SERVICE
fi
.
/lib/lsb/init-functions
if
[
-n
"
$2
"
]
;
then
FANOUT_OPTS
=
"
$FANOUT_OPTS
$2
"
fi
export
PATH
=
"
${
PATH
:+
$PATH
:
}
/usr/sbin:/sbin"
case
"
$1
"
in
start
)
log_daemon_msg
"Starting Fanout server"
"fanout"
||
true
if
start-stop-daemon
--start
--quiet
--oknodo
--pidfile
$PIDFILE
--exec
$DAEMON
--
$FANOUT_OPTS
;
then
log_end_msg 0
||
true
else
log_end_msg 1
||
true
fi
;;
stop
)
log_daemon_msg
"Stopping Fanout server"
"fanout"
||
true
if
start-stop-daemon
--stop
--quiet
--oknodo
--pidfile
$PIDFILE
;
then
log_end_msg 0
||
true
else
log_end_msg 1
||
true
fi
;;
restart
)
log_daemon_msg
"Restarting Fanout server"
"fanout"
||
true
start-stop-daemon
--stop
--quiet
--oknodo
--retry
30
--pidfile
$PIDFILE
if
start-stop-daemon
--start
--quiet
--oknodo
--pidfile
$PIDFILE
--exec
$DAEMON
--
$FANOUT_OPTS
;
then
log_end_msg 0
||
true
else
log_end_msg 1
||
true
fi
;;
status
)
status_of_proc
-p
$PIDFILE
$DAEMON
$SERVICE
&&
exit
0
||
exit
$?
;;
*
)
log_action_msg
"Usage: /etc/init.d/
$SERVICE
{start|stop|restart|status}"
||
true
exit
1
esac
exit
0
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment