]> jfr.im git - irc/gameservirc.git/blame - gameserv/cron/gscheck
updated the Change log w/ new additions
[irc/gameservirc.git] / gameserv / cron / gscheck
CommitLineData
f1247e2c 1#!/bin/sh
2#This file was taken from bnc2.8.6
3GSBIN=gameserv
4GSPIDFILE=gameserv.pid
5GSPATH=/home/yourdir/gameserv
6
7
8
9
10# Below here should be fine and left alone
11
12
13
14
15cd $GSPATH
16if test -r $GSPATH/$GSPIDFILE; then
17 GSPID=$(cat $GSPATH/$GSPIDFILE)
18 if $(kill -CHLD $GSPID >/dev/null 2>&1)
19 then
20 # lucky for us GameServ is still up
21 exit 0
22 fi
23 echo ""
24 echo "stale pid file (erasing it)"
25 rm -f $GSPATH/$GSPIDFILE
26fi
27echo ""
28echo "GameServ is dead........restarting it"
29echo ""
30if test -x $GSBIN ;then
31 $GSPATH/$GSBIN
32 exit 0
33fi
34echo "could not reload"
35