You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/games-server/pvpgn/files/pvpgn.rc

42 lines
994 B

#!/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.4 2011/12/04 10:27:13 swegener Exp $
extra_started_commands="reload"
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 $?
}