#! /bin/sh # ngircd Start/stop the Next Generation IRC Server # Version: ngircd 0.9.2 16-Nov-2005 # Autor: Mario Iseli ### BEGIN INIT INFO # Provides: ircd # Required-Start: $syslog # Required-Stop: $syslog # Should-Start: $local_fs, $network # Should-Stop: $local_fs, $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Next Generation IRC Server # Description: Starts ngircd in a proper way ### END INIT INFO PATH=/sbin:/bin:/usr/sbin:/usr/bin test -f /usr/sbin/ngircd || exit 0 set -e case "$1" in start) echo -n "Starting Next generation IRC server: " start-stop-daemon --start --chuid irc:irc \ --make-pidfile --background \ --pidfile /var/run/ngircd/ngircd.pid \ --exec /usr/sbin/ngircd -- -n echo "ngircd." ;; stop) echo -n "Stopping Next generation IRC server: " start-stop-daemon --stop --quiet \ --pidfile /var/run/ngircd/ngircd.pid \ --exec /usr/sbin/ngircd rm -f /var/run/ngircd/ngircd.pid echo "ngircd." ;; reload|force-reload) echo -n "Reloading Next generation IRC server configuration: " start-stop-daemon --stop --quiet --oknodo --signal 1 \ --pidfile /var/run/ngircd/ngircd.pid \ --exec /usr/sbin/ngircd echo "ngircd." ;; restart) echo -n "Restarting Next generation IRC server: " $0 stop sleep 1 $0 start echo "ngircd." ;; *) echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2 exit 1 ;; esac exit 0