[game-data-packager] 121/293: quake3-server.init: parameterize so we can use it for OA with minor changes
Simon McVittie
smcv at debian.org
Fri Oct 14 00:12:04 UTC 2016
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch quake
in repository game-data-packager.
commit 99d33262d02a99476a13bc8288ff61866c958582
Author: Simon McVittie <smcv at debian.org>
Date: Thu Nov 11 19:58:13 2010 +0000
quake3-server.init: parameterize so we can use it for OA with minor changes
---
debian/quake3-server.init | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/debian/quake3-server.init b/debian/quake3-server.init
index bd3e3ec..7ba059d 100644
--- a/debian/quake3-server.init
+++ b/debian/quake3-server.init
@@ -9,19 +9,20 @@
### END INIT INFO
PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin"
-DAEMON="/usr/games/quake3-server"
NAME="quake3-server"
+DAEMON="/usr/games/$NAME"
DESC="Quake III Arena dedicated server"
PIDFILE="/var/run/$NAME.pid"
BINARY="/usr/lib/ioquake3/ioq3ded"
+USER="Debian-quake3"
test -x $DAEMON || exit 0
. /lib/lsb/init-functions
# Include defaults if available
-if [ -f /etc/default/quake3-server ] ; then
- . /etc/default/quake3-server
+if [ -f /etc/default/$NAME ] ; then
+ . /etc/default/$NAME
fi
q3_start() {
@@ -29,12 +30,12 @@ q3_start() {
return 2
fi
if [ "$START_DAEMON" != 1 ]; then
- echo -n " (not starting - disabled in /etc/default/quake3-server)"
+ echo -n " (not starting - disabled in /etc/default/$NAME)"
return 0
fi
start-stop-daemon --start --quiet --pidfile $PIDFILE --oknodo \
--background --exec $BINARY --startas $DAEMON \
- --make-pidfile --chuid Debian-quake3 \
+ --make-pidfile --chuid $USER \
-- $DAEMON_OPTS > /dev/null 2>&1 || return 1
return 0
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/game-data-packager.git
More information about the Pkg-games-commits
mailing list