All pastes #455017 Raw Edit

Stuff

public text v1 · immutable
·published 2007-04-23 23:14 UTC
rendered paste body
ircddir="/home/darkspod/hybridssl"
ircdcmd="/home/darkspod/hybridssl/bin/ircd"
pidfile="/home/darkspod/hybridssl/etc/ircd.pid"

########## you probably don't need to change anything below here ##########

cd $ircddir

# is there a pid file?
if test -r $pidfile
then
  # there is a pid file -- is it current?
  ipid=`cat $pidfile`
  if `kill -CHLD $ipid >/dev/null 2>&1`
  then
    # it's still going -- back out quietly
    exit 0
  fi
  echo ""
  echo "Stale $pidfile file, erasing..."
  rm -f $pidfile
  $ircdcmd
fi