summaryrefslogtreecommitdiff
blob: e04802308a8cb62033c8d14d0741ad2ca3399f2f (plain)
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
#!/sbin/runscript
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

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 $?
}