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