3
# @brand@ This shell script takes care of starting and stopping
4
# the open-sTeam server.
7
# description: open-sTeam server.
9
# config: @configdir@/steam.cnf
10
# pidfile: /var/run/@brand@.pid
12
# Source function library.
13
. /etc/rc.d/init.d/functions
15
# Source networking configuration.
16
. /etc/sysconfig/network
20
pidfile="/var/run/@brand@.pid"
21
steamhome="@steamdir@"
22
configdir="@configdir@"
24
JAVA_HOME="@javahome@"
29
cd $steamhome && ./start --restart --pid="$pidfile" &> $logdir/init.d_start.log &
30
# Give server 10 seconds to start:
31
for x in 1 2 3 4 5 6 7 8 9 10; do
32
if [ -e "$pidfile" ]; then
38
if [ -e "$pidfile" ]; then
39
action $"Starting $prog: " /bin/true
40
touch /var/lock/subsys/$prog
43
action $"Starting $prog: " /bin/false
50
cd $steamhome && ./stop --pid="$pidfile" &> $logdir/init.d_stop.log
51
#kill `cat $pidfile` &> $logdir/init.d_stop.log
53
if [ $ret -eq 0 ]; then
54
action $"Stopping $prog: " /bin/true
56
action $"Stopping $prog: " /bin/false
58
[ $ret -eq 0 ] && rm -f /var/lock/subsys/$prog
69
[ -e /var/lock/subsys/$prog ] && restart || :
72
# See how we were called.
90
echo $"Usage: $0 {start|stop|status|condrestart|restart}"