#!/bin/sh # # ircd Internet Relay Chat # # chkconfig: 345 15 95 # description: Starts and stops the Internet Relay Chat daemon. # processname: /usr/local/sbin/ircd # Source function library. . /etc/rc.d/init.d/functions [ -f /usr/local/sbin/ircd ] || exit 1 PATH="$PATH:/usr/local/sbin" # See how we were called. case "$1" in start) # Start daemons. echo -n "Starting ircd: " daemon ircd # cd /usr/local/sbin/plum # /usr/bin/perl ./plum echo touch /var/lock/subsys/ircd ;; stop) # Stop daemons. echo -n "Shutting down ircd: " killproc ircd echo rm -f /var/lock/subsys/ircd # kill -KILL `cat /usr/local/sbin/plum/plum.pid` ;; restart|reload) $0 stop $0 start ;; *) echo "Usage: ircd {start|stop|restart}" exit 1 esac exit 0