#!/bin/sh
#
# Night Light IRC Proxy run check script
#
# Script to check whether ircproxy is running,
# if it isn't running then start it.
#
# Written by Jonas Kvinge
# Last modified: Jonas Kvinge (10.07.2006)
#
IRCPROXYBINFILE=/usr/bin/ircproxyd
IRCPROXYPIDFILE=/var/run/ircproxyd.pid
if test -r $IRCPROXYPIDFILE ; then
IRCPROXYPID=`cat $IRCPROXYPIDFILE`
kill -USR1 $IRCPROXYPID >/dev/null 2>&1
if [ $? -eq 0 ] ; then
exit 0
fi
rm -f $IRCPROXYPIDFILE
fi
if test -x $IRCPROXYBINFILE ; then
$IRCPROXYBINFILE
exit 0
fi
syntax highlighted by Code2HTML, v. 0.9.1