3
# init.d file to start the sTeam server.
5
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
8
pidfile="/var/run/@brand@.pid"
10
configdir="@configdir@"
12
JAVA_HOME="@javahome@"
15
if [ ! -x $steamhome/start ]; then
16
echo -n "sTeam startup script not executeable !"
23
echo -n "Starting sTeam server... "
24
cd $steamhome && ./start --restart --pid="$pidfile" &> $logdir/init.d_start.log &
25
for x in 1 2 3 4 5 6 7 8 9 10; do
26
if [ -e "$pidfile" ]; then
32
if [ -e "$pidfile" ]; then
33
echo "sTeam server started"
34
if [ -e /var/lock/subsys ]; then
35
touch /var/lock/subsys/$prog
39
echo "Failed to start sTeam server!"
46
echo -n "Stopping sTeam server... "
47
cd $steamhome && ./stop --pid="$pidfile" &> $logdir/init.d_stop.log
48
#kill `cat $pidfile` &> $logdir/init.d_stop.log
50
if [ $ret -eq 0 ]; then
51
echo "sTeam server stopped"
53
echo "Failed to stop sTeam server! (Is the server really running?)"
55
if [ -f $pidfile ]; then
58
if [ -e /var/lock/subsys/$prog ]; then
59
rm -f /var/lock/subsys/$prog
67
if [ -f $pidfile ]; then
68
echo "PID file exists, restarting sTeam server."
75
if [ ! -f $pidfile ]; then
76
echo "sTeam server is not running"
81
restart|force-reload|condrestart)
82
if [ -f $pidfile ]; then
89
echo $"Usage: $0 {start|stop|status|condrestart|restart}"