Lines 1-31
Link Here
|
1 |
#!/sbin/runscript |
1 |
#!/sbin/runscript |
2 |
# Copyright 1999-2005 Gentoo Foundation |
2 |
# Copyright 1999-2005 Gentoo Foundation |
3 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# Distributed under the terms of the GNU General Public License v2 |
4 |
# $Header: /var/cvsroot/gentoo-x86/net-irc/inspircd/files/init.d_inspircd,v 1.3 2007/07/11 08:10:47 hansmi Exp $ |
4 |
# $Header: $ |
5 |
|
5 |
|
6 |
opts="${opts} rehash" |
6 |
opts="${opts} rehash version" |
7 |
|
7 |
|
8 |
depend() { |
8 |
depend() { |
9 |
need net |
9 |
need net |
10 |
provide ircd |
10 |
provide ircd |
11 |
} |
11 |
} |
12 |
|
12 |
|
13 |
start() { |
13 |
start() { |
14 |
ebegin "Starting InspIRCd" |
14 |
ebegin "Starting InspIRCd" |
15 |
start-stop-daemon --start --quiet --chuid inspircd \ |
15 |
start-stop-daemon --start --quiet --chuid inspircd \ |
16 |
--exec /usr/bin/inspircd -- \ |
16 |
--exec /usr/bin/inspircd -- \ |
17 |
--logfile /var/log/inspircd/ircd.log &>/dev/null |
17 |
--logfile /var/log/inspircd/ircd.log &> /dev/null |
18 |
eend $? |
18 |
eend $? |
19 |
} |
19 |
} |
20 |
|
20 |
|
21 |
stop() { |
21 |
stop() { |
22 |
ebegin "Stopping InspIRCd" |
22 |
ebegin "Stopping InspIRCd" |
23 |
start-stop-daemon --stop --quiet --pidfile /var/run/inspircd/ircd.pid |
23 |
start-stop-daemon --stop --quiet --exec /usr/bin/inspircd |
24 |
eend $? |
24 |
eend $? |
25 |
} |
25 |
} |
26 |
|
26 |
|
27 |
rehash() { |
27 |
rehash() { |
28 |
ebegin "Rehashing InspIRCd" |
28 |
ebegin "Rehashing InspIRCd" |
29 |
kill -s SIGHUP $(</var/run/inspircd/ircd.pid) |
29 |
/usr/lib/inspircd/inspircd.launcher/inspircd rehash &> /dev/null |
|
|
30 |
eend $? |
31 |
} |
32 |
|
33 |
version() { |
34 |
ebegin "Retrieve InspIRCd version" |
35 |
/usr/lib/inspircd/inspircd.launcher/inspircd version |
30 |
eend $? |
36 |
eend $? |
31 |
} |
37 |
} |