#!/bin/sh
# Rehash Script v2.0
# $Id$

IRCDPID="ircd.pid"

if [ ! -r $IRCDPID ]; then
clear
echo "|--------------------------------------------|"
echo "|              **** ERROR ****               |"
echo "|             Possible problems:             |"
echo "| (1) $IRCDPID not found                     |"
echo "| (2) The IRCd is not running                |"
echo "|--------------------------------------------|"
else
PID=`cat $IRCDPID`
kill -HUP $PID
echo "|----------------------------------------"
echo "| UnrealIRCD successfully rehashed."
echo "| Process ID: $PID"
echo "|----------------------------------------"
fi

