File: botchk.sh

package info (click to toggle)
blootbot 1.1.0-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,420 kB
  • ctags: 586
  • sloc: perl: 15,941; sh: 154; makefile: 56; sql: 45
file content (19 lines) | stat: -rwxr-xr-x 323 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh

BOTDIR=/home/apt/bot
BOTNICK=blootbot
PIDFILE=$BOTDIR/$BOTNICK.pid

if [ -f $PIDFILE ]; then	# exists.
    PID=`cat $PIDFILE`
    if [ -d /proc/$PID ]; then	# already running.
	exit 0
    fi

    # blootbot removes the pid file.
    echo "stale pid file; removing."
#    rm -f $PIDFILE
fi

cd $BOTDIR
./blootbot