Ignore:
Timestamp:
07/12/07 09:41:07 (17 years ago)
Author:
bastiaans
Message:

pkg/deb/init.d/jobmond:

  • working init.d script
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pkg/deb/init.d/jobmond

    r430 r436  
    66DESC="Job Monitor Daemon"
    77
     8PIDFILE="/var/run/jobmond.pid"
     9
    810test -x $DAEMON || exit 0
    911
    10 set -e
     12[ -r /etc/default/$NAME ] && . /etc/default/$NAME
    1113
    1214case "$1" in
    1315  start)
    1416        echo -n "Starting $DESC: "
    15         start-stop-daemon --start --quiet -m --pidfile /var/run/$NAME.pid \
    16                 --exec $DAEMON
     17        start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
     18                --exec $DAEMON -- --pidfile "$PIDFILE" || { echo " start failed."; exit 1; }
    1719        echo "$NAME."
    1820        ;;
    1921  stop)
    2022        echo -n "Stopping $DESC: "
    21         start-stop-daemon --stop  --quiet --oknodo --name $DAEMON \
    22                 2>&1 > /dev/null
     23        start-stop-daemon --stop  --quiet --pidfile /var/run/$NAME.pid \
     24                --signal 9 2>&1 > /dev/null || { rm -f "$PIDFILE"; echo " not running."; exit 1; }
    2325        echo "$NAME."
     26        rm -f "$PIDFILE"
     27        exit 0
    2428        ;;
    2529  restart|force-reload)
Note: See TracChangeset for help on using the changeset viewer.