3 # ngIRCd start and stop script for Debian-based systems
5 # $Id: ngircd.init,v 1.5 2005/06/01 21:51:11 alex Exp $
8 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
9 DAEMON=/usr/sbin/ngircd
14 test -h "$0" && BASENAME=`readlink $0` || BASENAME=`basename $0`
16 test -f /etc/default/$BASENAME && . /etc/default/$BASENAME
18 test -x $DAEMON || exit 0
22 $DAEMON --configtest >/dev/null 2>&1
24 echo "Configuration of $NAME is not valide, won't (re)start!"
25 echo "Please run \"$DAEMON --configtest\" manually and fix it up ..."
32 [ ! -d /var/run/ircd ] || chown irc:irc /var/run/ircd
33 start-stop-daemon --start --quiet --exec $DAEMON -- $PARAMS
44 echo -n "Starting $DESC: "
48 echo -n "Stopping $DESC: "
49 start-stop-daemon --stop --quiet --pidfile /var/run/ircd/ngircd.pid --exec $DAEMON \
51 || echo "(none running)"
55 echo "Reloading $DESC configuration files."
56 start-stop-daemon --stop --signal 1 --quiet --exec $DAEMON
60 echo -n "Restarting $DESC: "
61 start-stop-daemon --stop --quiet --oknodo --exec $DAEMON
67 echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2