summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--res/debian/rhizi.init11
1 files changed, 5 insertions, 6 deletions
diff --git a/res/debian/rhizi.init b/res/debian/rhizi.init
index 0d925347..c8c6870d 100644
--- a/res/debian/rhizi.init
+++ b/res/debian/rhizi.init
@@ -14,9 +14,8 @@
# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="rhizi-server"
-NAME=rhizi-server
+NAME=rhizi
DAEMON=/srv/www/rhizi/rhizi.net/bin/rz_server.py
-DAEMON_ARGS="--config-dir=/etc/rhizi"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
USERNAME=www-data
@@ -48,10 +47,10 @@ do_start()
# 0 if daemon has been started
# 1 if daemon was already running
# 2 if daemon could not be started
- start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
+ start-stop-daemon --start --quiet --pidfile $PIDFILE $ARGS__START_STOP_DAEMON --exec $DAEMON --test > /dev/null \
|| return 1
- start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
- $DAEMON_ARGS \
+ start-stop-daemon --start --quiet --pidfile $PIDFILE $ARGS__START_STOP_DAEMON --exec $DAEMON -- \
+ $ARGS__DAEMON \
|| return 2
}
@@ -65,7 +64,7 @@ do_stop()
# 1 if daemon was already stopped
# 2 if daemon could not be stopped
# other if a failure occurred
- start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
+ start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE
RETVAL="$?"
[ "$RETVAL" = 2 ] && return 2