12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- #! /bin/sh
- # ngircd Start/stop the Next Generation IRC Server
- # Version: ngircd 0.9.2 16-Nov-2005
- # Autor: Mario Iseli <admin@marioiseli.com>
- 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
|