Ignore:
Timestamp:
02/22/08 14:19:35 (15 years ago)
Author:
bastiaans
Message:

rpm/init.d/*:

  • cleanup
File:
1 edited

Legend:

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

    r437 r483  
    1515
    1616RETVAL=0
    17 name=jobmond
    18 prog=/usr/sbin/jobmond
    19 desc="Job Monitoring Daemon"
     17NAME=jobmond
     18DAEMON=/usr/sbin/jobmond
     19DESC="Job Monitoring Daemon"
    2020
     21PIDFILE=/var/run/$NAME.pid
    2122OPTIONS=""
    2223
    23 if [ -r /etc/sysconfig/$name ]; then
    24         source /etc/sysconfig/$name
     24if [ -r /etc/sysconfig/$name ]
     25        then
     26                source /etc/sysconfig/$NAME
    2527fi
    2628
    2729start() {
    28         echo -n $"Starting $desc: "
    29         daemon $prog -p /var/run/$name.pid $OPTIONS
     30        echo -n $"Starting $DESC: "
     31        daemon $DAEMON --pidfile="$PIDFILE" $OPTIONS
    3032        RETVAL=$?
    3133        echo
    32         [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$name
     34        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$NAME
    3335        return $RETVAL
    3436}
    3537
    3638stop() {
    37         echo -n $"Stopping $desc: "
    38         killproc $prog
     39        echo -n $"Stopping $DESC: "
     40        killproc $DAEMON
    3941        RETVAL=$?
    4042        echo
    41         [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$name
     43        rm -f $PIDFILE
     44        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$NAME
    4245        return $RETVAL
    4346}
     
    5962                ;;
    6063        condrestart)
    61                 [ -e /var/lock/subsys/$name ] && restart
     64                [ -e /var/lock/subsys/$NAME ] && restart
    6265                RETVAL=$?
    6366                ;;
Note: See TracChangeset for help on using the changeset viewer.