summaryrefslogtreecommitdiff
blob: 1c1a2c83f9e48d58f042916166f47928233eae67 (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
32
33
34
35
36
37
38
39
#!/sbin/openrc-run
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

extra_commands="rehash version"

depend() {
	need net
	provide ircd
}

start() {
	ebegin "Starting InspIRCd"
	checkpath -d -m 0750 -o inspircd:inspircd /var/run/inspircd
	start-stop-daemon --start --quiet --user inspircd \
		--exec /usr/bin/inspircd -- \
		--config /etc/inspircd/inspircd.conf \
		--logfile /var/log/inspircd/ircd.log
	eend $?
}

stop() {
	ebegin "Stopping InspIRCd"
	start-stop-daemon --stop --quiet --exec /usr/bin/inspircd
	eend $?
}

rehash() {
	ebegin "Rehashing InspIRCd"
	/usr/lib/inspircd/inspircd rehash
	eend $?
}

version() {
	ebegin "Retrieve InspIRCd version"
	/usr/lib/inspircd/inspircd version
	eend $?
}