Changeset 437


Ignore:
Timestamp:
07/12/07 10:34:05 (14 years ago)
Author:
bastiaans
Message:
  • more pkg fixes
Location:
trunk/pkg
Files:
4 edited

Legend:

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

    r430 r437  
    22
    33PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
    4 DAEMON=/usr/bin/jobarchived
     4DAEMON=/usr/sbin/jobarchived
    55NAME=jobarchived
    6 DESC="Job Archive Daemon"
     6DESC="Job Archiving Daemon"
    77
    8 export PYTHONPATH=/usr/share/jobarchived:$PYTHONPATH
     8PIDFILE="/var/run/jobarchived.pid"
     9OPTIONS=""
    910
    1011test -x $DAEMON || exit 0
    1112
    12 set -e
     13[ -r /etc/default/$NAME ] && . /etc/default/$NAME
    1314
    1415case "$1" in
    1516  start)
    1617        echo -n "Starting $DESC: "
    17         start-stop-daemon --start --quiet -m --pidfile /var/run/$NAME.pid \
    18                 --exec $DAEMON
    19         sleep 1
    20         ps -ef | grep jobarchived$ | awk '{ print $2 }' >/var/run/$NAME.pid
     18        start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
     19                --exec $DAEMON -- --pidfile "$PIDFILE" $OPTIONS || { echo " start failed."; exit 1; }
    2120        echo "$NAME."
    2221        ;;
    2322  stop)
    2423        echo -n "Stopping $DESC: "
    25         start-stop-daemon --stop  --quiet --oknodo --name $DAEMON \
    26                 2>&1 > /dev/null
    27         sleep 1
    28         test -f /var/run/$NAME.pid && MYPID=`cat /var/run/$NAME.pid`
    29         test ! -z $MYPID && ps $MYPID 2>&1 > /dev/null && kill -9 $MYPID 2>&1 > /dev/null
     24        start-stop-daemon --stop  --quiet --pidfile /var/run/$NAME.pid \
     25                --signal 9 2>&1 > /dev/null || { rm -f "$PIDFILE"; echo " not running."; exit 1; }
    3026        echo "$NAME."
     27        rm -f "$PIDFILE"
     28        exit 0
    3129        ;;
    3230  restart|force-reload)
  • trunk/pkg/deb/init.d/jobmond

    r436 r437  
    22
    33PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
    4 DAEMON=/usr/bin/jobmond
     4DAEMON=/usr/sbin/jobmond
    55NAME=jobmond
    66DESC="Job Monitor Daemon"
     
    1010test -x $DAEMON || exit 0
    1111
     12OPTIONS=""
     13
    1214[ -r /etc/default/$NAME ] && . /etc/default/$NAME
    1315
     
    1618        echo -n "Starting $DESC: "
    1719        start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
    18                 --exec $DAEMON -- --pidfile "$PIDFILE" || { echo " start failed."; exit 1; }
     20                --exec $DAEMON -- --pidfile "$PIDFILE" $OPTIONS || { echo " start failed."; exit 1; }
    1921        echo "$NAME."
    2022        ;;
  • trunk/pkg/rpm/init.d/jobarchived

    r435 r437  
    1818prog=/usr/sbin/jobarchived
    1919desc="Job Archiving Daemon"
     20
     21OPTIONS=""
    2022
    2123if [ -r /etc/sysconfig/$name ]; then
  • trunk/pkg/rpm/init.d/jobmond

    r432 r437  
    1818prog=/usr/sbin/jobmond
    1919desc="Job Monitoring Daemon"
     20
     21OPTIONS=""
    2022
    2123if [ -r /etc/sysconfig/$name ]; then
Note: See TracChangeset for help on using the changeset viewer.