cleanup init.d

This commit is contained in:
j 2011-02-23 13:25:57 +01:00
commit 207594c7cd
3 changed files with 11 additions and 13 deletions

View file

@ -46,11 +46,11 @@ do_start()
# 0 if daemon has been started
# 1 if daemon was already running
# 2 if daemon could not be started
killall oxframe
test -e /var/log/pandora || (mkdir -p /var/log/pandora && chown $DAEMON_USER:$DAEMON_USER /var/log/pandora)
start-stop-daemon --start --quiet --pidfile $PIDFILE -c $DAEMON_USER \
--exec $DAEMON --test > /dev/null \
|| return 1
start-stop-daemon --start --quiet --pidfile $PIDFILE -c $DAEMON_USER \
start-stop-daemon --start --quiet --pidfile $PIDFILE -c $DAEMON_USER -startas $DAEMON \
--make-pidfile --background --exec $DAEMON -- $DAEMON_ARGS \
|| return 2
}
@ -65,8 +65,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 \
-c $DAEMON_USER --name $DAEMON_NAME
start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE
RETVAL="$?"
[ "$RETVAL" = 2 ] && return 2
# Wait for children to finish too if this is a daemon that forks