Commit 334144d7 authored by Julien Muchembled's avatar Julien Muchembled

debian: fix detection of already started daemon in init.d script

parent bf65bc45
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
# PATH should only include /usr/* if it runs after the mountnfs.sh script # PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/sbin:/usr/sbin:/bin:/usr/bin PATH=/sbin:/usr/sbin:/bin:/usr/bin
NAME=#NAME# NAME=#NAME#
DESC=$NAME DESC="Resilient, Scalable, IPv6 Network application"
DAEMON=#DAEMON_DIR#/$NAME DAEMON=#DAEMON_DIR#/$NAME
CONFDIR=/etc/re6stnet CONFDIR=/etc/re6stnet
PIDFILE=/var/run/$NAME.pid PIDFILE=/var/run/$NAME.pid
...@@ -35,9 +35,9 @@ do_start() ...@@ -35,9 +35,9 @@ do_start()
# 0 if daemon has been started # 0 if daemon has been started
# 1 if daemon was already running # 1 if daemon was already running
# 2 if daemon could not be started # 2 if daemon could not be started
set start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON set start-stop-daemon --quiet --pidfile $PIDFILE
"$@" --test > /dev/null || return 1 "$@" --stop --test --name $NAME && return 1
"$@" --make-pidfile --background --chdir $CONFDIR -- @$NAME.conf || return 2 "$@" --start --make-pidfile --background --chdir $CONFDIR --exec $DAEMON -- @$NAME.conf || return 2
} }
# #
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment