diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /games-server/pvpgn/files/pvpgn.rc |
reinit the tree, so we can have metadata
Diffstat (limited to 'games-server/pvpgn/files/pvpgn.rc')
-rw-r--r-- | games-server/pvpgn/files/pvpgn.rc | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/games-server/pvpgn/files/pvpgn.rc b/games-server/pvpgn/files/pvpgn.rc new file mode 100644 index 000000000000..83da55a62c15 --- /dev/null +++ b/games-server/pvpgn/files/pvpgn.rc @@ -0,0 +1,40 @@ +#!/sbin/openrc-run +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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 $? +} |