blob: 0e3a05d5728f43a2d4dfc4e9ab373ddd3c417548 (
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
|
#!/sbin/openrc-run
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
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 $?
}
|