summaryrefslogtreecommitdiff
blob: e75f21635c48d642333abdf14e592f2227f7d073 (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
#!/sbin/runscript
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-fps/enemy-territory/files/et-ded.rc,v 1.1 2003/09/09 18:10:14 vapier Exp $

depend() {
	need net
}

start() {
	ebegin "Starting Enemy Territory dedicated server..."
	export HOME=/opt/enemy-territory
	screen -A -m -d -S et-ded su - GAMES_USER_DED -c GENTOO_DIR/etded
	eend $?
}

stop() {
	ebegin "Stopping Enemy Territory dedicated server..."
	pid=`screen -list | grep etded | awk -F . '{print $1}' | sed -e s/.//`
	kill $pid
	eend $?
}

status() {
	screen -list | grep etded
}