]> git.donarmstrong.com Git - infobot.git/blob - scripts/botchk.sh
modify for new debian release
[infobot.git] / scripts / botchk.sh
1 #!/bin/sh
2
3 BOTDIR=/home/apt/bot
4 BOTNICK=infobot
5 PIDFILE=$BOTDIR/$BOTNICK.pid
6
7 if [ -f $PIDFILE ]; then        # exists.
8     PID=`cat $PIDFILE`
9     if [ -d /proc/$PID ]; then  # already running.
10         exit 0
11     fi
12
13     # infobot removes the pid file.
14     echo "stale pid file; removing."
15 #    rm -f $PIDFILE
16 fi
17
18 cd $BOTDIR
19 ./infobot
20
21 # vim:ts=4:sw=4:expandtab:tw=80