Sophie

Sophie

distrib > Fedora > 17 > i386 > media > updates-src > by-pkgid > b63635e1ab4bc672f7d6e7a08a5dcfc3 > files > 2

vmpsd-1.4.05-1.fc17.src.rpm

#!/bin/bash
#
# chkconfig: - 92 8
# description: vmpsd is a GPL implementation of Cisco's VMPS
# processname: vmpsd
# pidfile: /var/run/vmpsd.pid
# config: /etc/sysconfig/vmpsd

# source function library
. /etc/init.d/functions

if test -e /etc/sysconfig/vmpsd ; then
    . /etc/sysconfig/vmpsd
fi

RETVAL=0

start() {
        echo -n $"Starting vmpsd: "

        daemon --user nobody vmpsd $OPTIONS
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/vmpsd
}

stop() {
        echo -n $"Shutting down vmpsd: "
        killproc vmpsd
        RETVAL=$?

        echo
        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/vmpsd
}

case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  restart|reload)
        stop
        start
        ;;
  condrestart)
        if [ -f /var/lock/subsys/vmpsd ]; then
            stop
            start
        fi
        ;;
  status)
        status vmpsd
        RETVAL=$?
        ;;
  *)
        echo $"Usage: $0 {start|stop|restart|condrestart|status}"
        exit 1
esac

exit $RETVAL