3 # ngIRCd start and stop script for Debian-based systems
5 # $Id: ngircd.init,v 1.6 2005/07/26 19:37:18 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" && me=`readlink $0` || me="$0"
15 BASENAME=`basename $me`
17 test -f /etc/default/$BASENAME && . /etc/default/$BASENAME
19 test -x $DAEMON || exit 0
23 $DAEMON --configtest >/dev/null 2>&1
25 echo "Configuration of $NAME is not valide, won't (re)start!"
26 echo "Please run \"$DAEMON --configtest\" manually and fix it up ..."
33 [ ! -d /var/run/ircd ] || chown irc:irc /var/run/ircd
34 start-stop-daemon --start --quiet --exec $DAEMON -- $PARAMS
45 echo -n "Starting $DESC: "
49 echo -n "Stopping $DESC: "
50 start-stop-daemon --stop --quiet --pidfile /var/run/ircd/ngircd.pid --exec $DAEMON \
52 || echo "(none running)"
56 echo "Reloading $DESC configuration files."
57 start-stop-daemon --stop --signal 1 --quiet --exec $DAEMON
61 echo -n "Restarting $DESC: "
62 start-stop-daemon --stop --quiet --oknodo --exec $DAEMON
68 echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2