blob: 687eee7009826f3f786e7e8121e3e91cb833f766 (
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
40
41
|
#!/sbin/runscript
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-server/pvpgn/files/pvpgn.rc,v 1.2 2011/05/22 21:04:13 mr_bones_ Exp $
opts="reload shutdown"
depend() {
need net
}
checkconfig() {
if [[ ! -f /etc/games/pvpgn/NAME.conf ]] ; then
eerror "You must have a NAME.conf configuration file to start NAME"
return 1
fi
}
start() {
checkconfig || return 1
ebegin "Starting PvPGN NAME"
start-stop-daemon --background --start --quiet \
--make-pidfile \
--pidfile /var/run/NAME.pid \
--exec GAMES_BINDIR/NAME -c GAMES_USER:GAMES_GROUP -- -f
eend $? "Failed to start NAME"
}
stop() {
ebegin "Stopping PvPGN NAME"
start-stop-daemon --stop --quiet --retry 20 \
--pidfile /var/run/NAME.pid
eend $?
}
reload() {
ebegin "Rehashing configuration for PvPGN NAME"
start-stop-daemon --stop --signal HUP --oknodo \
--pidfile /var/run/NAME.pid
eend $?
}
|