#!/bin/sh # # chkconfig: - 92 5 # description: bip is an IRC proxy server # BIP=/usr/bin/bip # Source function library. . /etc/init.d/functions # Source networking configuration. . /etc/sysconfig/network # Check that networking is up. [ ${NETWORKING} = "no" ] && exit 0 RETVAL="0" [ -x "$BIP" ] || exit 0 # See how we were called. case "$1" in start) gprintf "Starting bip: " daemon --user=bip $BIP -f /etc/bip.conf RETVAL=$? echo [ $RETVAL -eq 0 ] && touch /var/lock/subsys/bip ;; stop) gprintf "Stopping bip: " killproc bip RETVAL=$? echo [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/bip ;; status) status bip RETVAL=$? ;; restart) $0 status >/dev/null && $0 stop $0 start RETVAL=$? ;; condrestart) [ -f "/var/lock/subsys/bip" ] && $0 restart || : RETVAL=$? echo ;; reload) gprintf "Reloading bip: " killproc bip -HUP RETVAL=$? echo ;; *) gprintf "Usage: %s {start|stop|status|restart|reload}\n" "$0" exit 1 esac exit $RETVAL