mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-06-26 21:36:37 +02:00
62 lines
1.5 KiB
Bash
Executable File
62 lines
1.5 KiB
Bash
Executable File
#!/bin/sh
|
|
# IRCD Script v3.0
|
|
# $Id$
|
|
#
|
|
DIR=`pwd`
|
|
DATE=`date +"%a, %b %e %Y"`
|
|
TIME=`date +"%H:%M:%S %Z"`
|
|
IRCDPID="ircd.pid"
|
|
BACKUP="ircd.bak"
|
|
|
|
if [ -r $IRCDPID ]; then
|
|
mv -f $IRCDPID $BACKUP
|
|
src/ircd
|
|
sleep 1
|
|
if [ ! -r $IRCDPID ]; then
|
|
mv -f $BACKUP $IRCDPID
|
|
echo "=========================================="
|
|
echo "|| Error encountered (IRCd not started) ||"
|
|
echo "=========================================="
|
|
echo "Check ircd.log and the messages above for more information"
|
|
echo "If you cannot solve the problem, check Unreal.nfo on where"
|
|
echo "to ask for support."
|
|
echo "Output of ircd.log:"
|
|
tail ircd.log
|
|
exit
|
|
else
|
|
echo "|----------------------------------------"
|
|
echo "| UnrealIRCD successfully loaded."
|
|
echo "| Directory: $DIR"
|
|
echo "| Date: $DATE"
|
|
echo "| Time: $TIME"
|
|
PID=`cat ircd.pid`
|
|
echo "| Process ID: $PID"
|
|
echo "|----------------------------------------"
|
|
rm -f $BACKUP
|
|
fi
|
|
else
|
|
src/ircd
|
|
sleep 2
|
|
if [ ! -r $IRCDPID ]; then
|
|
echo "=========================================="
|
|
echo "|| Error encountered (IRCd not started) ||"
|
|
echo "=========================================="
|
|
echo "Check ircd.log and the messages above for more information"
|
|
echo "If you cannot solve the problem, check Unreal.nfo on where"
|
|
echo "to ask for support."
|
|
echo ""
|
|
echo "Output of ircd.log:"
|
|
tail ircd.log
|
|
exit
|
|
else
|
|
echo "|----------------------------------------"
|
|
echo "| UnrealIRCD successfully loaded."
|
|
echo "| Directory: $DIR"
|
|
echo "| Date: $DATE"
|
|
echo "| Time: $TIME"
|
|
PID=`cat ircd.pid`
|
|
echo "| Process ID: $PID"
|
|
echo "|----------------------------------------"
|
|
fi
|
|
fi
|