1
0

ngircd.init 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #! /bin/sh
  2. # ngircd Start/stop the Next Generation IRC Server
  3. # Version: ngircd 0.9.2 16-Nov-2005
  4. # Autor: Mario Iseli <admin@marioiseli.com>
  5. PATH=/sbin:/bin:/usr/sbin:/usr/bin
  6. test -f /usr/sbin/ngircd || exit 0
  7. set -e
  8. case "$1" in
  9. start)
  10. echo -n "Starting Next generation IRC server: "
  11. start-stop-daemon --start --chuid irc:irc \
  12. --make-pidfile --background \
  13. --pidfile /var/run/ngircd/ngircd.pid \
  14. --exec /usr/sbin/ngircd -- -n
  15. echo "ngircd."
  16. ;;
  17. stop)
  18. echo -n "Stopping Next generation IRC server: "
  19. start-stop-daemon --stop --quiet \
  20. --pidfile /var/run/ngircd/ngircd.pid \
  21. --exec /usr/sbin/ngircd
  22. rm -f /var/run/ngircd/ngircd.pid
  23. echo "ngircd."
  24. ;;
  25. reload|force-reload)
  26. echo -n "Reloading Next generation IRC server configuration: "
  27. start-stop-daemon --stop --quiet --oknodo --signal 1 \
  28. --pidfile /var/run/ngircd/ngircd.pid \
  29. --exec /usr/sbin/ngircd
  30. echo "ngircd."
  31. ;;
  32. restart)
  33. echo -n "Restarting Next generation IRC server: "
  34. $0 stop
  35. sleep 1
  36. $0 start
  37. echo "ngircd."
  38. ;;
  39. *)
  40. echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
  41. exit 1
  42. ;;
  43. esac
  44. exit 0