#!/bin/sh # # func: Starts the func daemon # # Version: @(#) /etc/rc.d/init.d/func 0.1 # # chkconfig: - 98 99 # description: Starts and stops the func daemon at startup and shutdown.. . /etc/rc.d/init.d/functions RETVAL=0 # See how we were called. case "$1" in start) # Check if the service is already running? if [ ! -f /var/lock/subsys/funcd ]; then msg_starting "funcd" daemon /usr/bin/funcd RETVAL=$? [ $RETVAL -eq 0 ] && touch /var/lock/subsys/funcd else msg_already_running "funcd" fi ;; stop) if [ -f /var/lock/subsys/funcd ]; then msg_stopping "funcd" killproc funcd rm -f /var/lock/subsys/funcd else msg_not_running "funcd" fi ;; status) status funcd exit $? ;; restart|force-reload) $0 stop $0 start exit $? ;; *) msg_usage "$0 {start|stop|restart|force-reload|status}" exit 3 esac exit $RETVAL