Commit 7597c0b9 authored by Thibault VINCENT's avatar Thibault VINCENT
Browse files

80col init script and fix

parent f14b1fd5
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@
### END INIT INFO

# Author: Antoine Millet <antoine.millet@smartjog.com>
#         Thibault VINCENT <thibault.vincent@smartjog.com>

PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="CloudControl node"
@@ -63,7 +64,8 @@ do_start()
#
do_stop()
{
        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 --name $NAME
        RETVAL="$?"
        [ "$RETVAL" = 2 ] && return 2
        # Wait for children to finish too if this is a daemon that forks
@@ -72,7 +74,8 @@ do_stop()
        # that waits for the process to drop all resources that could be
        # needed by services started subsequently.  A last resort is to
        # sleep for some time.
        start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
        start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 \
            --exec $DAEMON
        [ "$?" = 2 ] && return 2
        # Many daemons don't delete their pidfiles when they exit.
        rm -f $PIDFILE
@@ -83,7 +86,8 @@ do_stop()
# Function that sends a SIGHUP to the daemon/service
#
do_reload() {
        start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
        start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE \
            --name $NAME
        return 0
}