#!/bin/sh
if [ $# -eq 0 -o x$1 = xstart ]; then
  if [ -x /usr/local/bin/ircd ]; then
    su -fm ircd -c /usr/local/bin/ircd && echo ' ircd'
  fi
fi
if [ x$1 = xstop ]; then
  if [ -f /usr/local/etc/ircd.pid ]; then
    kill `cat /usr/local/etc/ircd.pid`
  else
    # oh well
    killall ircd
  fi
fi
