#!/bin/sh

# change this to the name of your ircd's file in that directory:
ircdexe="./ircd"

# I wouldn't touch this if I were you.
pidfile="ircd.pid"

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

if [ -r $pidfile ]; then
  ircdpid=`cat $pidfile >/dev/null 2>&1`
  if `kill -CHLD $ircdpid >/dev/null 2>&1`; then
    exit 0
  fi
  rm -f $pidfile >/dev/null 2>/dev/null
fi
$ircdexe >/dev/null 2>/dev/null
