/etc/init.d/ircd-irc2 is in ircd-irc2 2.11.2p3~dfsg-4.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | #!/bin/sh
### BEGIN INIT INFO
# Provides: ircd-irc2
# Required-Start: $network $remote_fs
# Required-Stop: $network $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: Starts/stops the irc daemon
# Description: Provide IRC service with the IRC daemon
### END INIT INFO
set -e
. /lib/lsb/init-functions
# $PATH to go
PATH=/sbin:/bin:/usr/sbin:/usr/bin
# where the irc-daemon is
IRCD=/usr/sbin/ircd
NAME=ircd
PIDFILE=/var/run/ircd/ircd.pid
check_pid_dir() {
if [ ! -d /var/run/ircd ]; then
mkdir /var/run/ircd
chown irc:irc /var/run/ircd
chmod 775 /var/run/ircd
fi
}
# Gracefully exit if the package has been removed.
test -x $IRCD || exit 0
status_ircd() {
status_of_proc -p "${PIDFILE}" "${IRCD}" "${NAME}"
}
case "$1" in
start)
check_pid_dir
echo -n "Starting irc server daemon:"
echo -n " ${NAME}"
start-stop-daemon --start --quiet --pidfile ${PIDFILE} \
--chuid irc --exec ${IRCD} --oknodo
echo "."
;;
stop)
echo -n "Stopping irc server daemon:"
echo -n " ${NAME}"
start-stop-daemon --stop --quiet --oknodo \
--pidfile ${PIDFILE} --exec ${IRCD}
echo "."
;;
status)
status_ircd
;;
reload|force-reload)
echo -n "Reloading irc server daemon:"
echo -n " ${NAME}"
start-stop-daemon --stop --signal 1 --quiet \
--pidfile ${PIDFILE} --exec ${IRCD}
echo "."
;;
restart)
check_pid_dir
echo -n "Restarting irc server daemon:"
echo -n " ${NAME}"
start-stop-daemon --stop --quiet --oknodo \
--pidfile ${PIDFILE} --exec ${IRCD}
sleep 1
start-stop-daemon --start --quiet --pidfile ${PIDFILE} \
--chuid irc --exec ${IRCD}
echo "."
;;
*)
echo "Usage: $0 {start|stop|status|restart|reload|force-reload}"
exit 1
;;
esac
exit 0
|