File: check-master

package info (click to toggle)
alien-arena 7.53%2Bdfsg-3
  • links: PTS, VCS
  • area: contrib
  • in suites: wheezy
  • size: 9,384 kB
  • sloc: ansic: 109,452; cpp: 41,132; sh: 4,278; makefile: 545; ruby: 438
file content (30 lines) | stat: -rwxr-xr-x 498 bytes parent folder | download | duplicates (9)
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
27
28
29
30
#! /bin/sh
#
# AA Master Server - check alive
# Author: Tony Jackson

ulimit -c unlimited

### Master Directory
dir="/home/aa/master"

### Master Binary Name
bin="crmaster"

###############################
# Don't edit below this line! # 
###############################


cd $dir

# check server is running
echo "Checking for master server..."
if `pidof $bin >/dev/null 2>&1`
then
echo "Master server is currently running."
exit 0
else
echo "Master server not running - restarting..."
./$bin &
fi