3 # ngIRCd start and stop script for Debian-based systems
5 # $Id: ngircd.init,v 1.7 2006/12/26 14:43:46 alex Exp $
10 # Required-Start: $local_fs
11 # Required-Stop: $local_fs
12 # Should-Start: $syslog $network
13 # Should-Stop: $syslog $network
14 # Default-Start: 2 3 4 5
16 # Short-Description: Next Generation IRC Server
19 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
20 DAEMON=/usr/sbin/ngircd
25 test -h "$0" && me=`readlink $0` || me="$0"
26 BASENAME=`basename $me`
28 test -f /etc/default/$BASENAME && . /etc/default/$BASENAME
30 test -x $DAEMON || exit 0
34 $DAEMON --configtest >/dev/null 2>&1
36 echo "Configuration of $NAME is not valide, won't (re)start!"
37 echo "Please run \"$DAEMON --configtest\" manually and fix it up ..."
44 [ ! -d /var/run/ircd ] || chown irc:irc /var/run/ircd
45 start-stop-daemon --start --quiet --exec $DAEMON -- $PARAMS
56 echo -n "Starting $DESC: "
60 echo -n "Stopping $DESC: "
61 start-stop-daemon --stop --quiet --pidfile /var/run/ircd/ngircd.pid --exec $DAEMON \
63 || echo "(none running)"
67 echo "Reloading $DESC configuration files."
68 start-stop-daemon --stop --signal 1 --quiet --exec $DAEMON
72 echo -n "Restarting $DESC: "
73 start-stop-daemon --stop --quiet --oknodo --exec $DAEMON
79 echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2