#!/sbin/runscript # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/net-irc/irc-server/files/ircd.rc,v 1.5 2008/07/14 14:41:54 armin76 Exp $ depend() { use net } IRCD_USER=${IRCD_USER:-ircd} checkconfig() { if [ ! -e /etc/ircd/ircd.conf ] ; then eerror "You need to create /etc/ircd/ircd.conf first." eerror "An example can be found in /etc/ircd/ircd.conf.example" return 1 fi } start() { checkconfig || return $? ebegin "Starting ircd" start-stop-daemon --start --quiet --chuid "${IRCD_USER}" --exec /usr/sbin/ircd -- ${IRCD_OPTS} eend $? } stop() { ebegin "Stopping ircd" start-stop-daemon --stop --quiet --pidfile /var/run/ircd/ircd.pid eend $? }