Perhaps someone could explain what is going wrong in this set-up and why isn't services creating a pid file? I'm trying to ensure anope runs on reboot and that it restarts if the service isn't running.
What happens is the service does run on crontab but the pid is never created. So every 2 minutes services tries to reconnect and I get "11:08 !irc.example.com *** Permanent Global Q:line added for OperServ on Sat Dec 5 16:08:29 && 2009 GMT (from services.example.com: Reserved for services)" until I manually create the pid via ps aux|grep services && echo 25700 >> ~/bin/anope/bin/services.pid. As soon as I create that file the service quits trying to reconnect and everything is fine (until reboot.)
czar@kremlin:~/bin/anope/data/backups$ crontab -l
# m h dom mon dow command
*/2 * * * * /home/czar/bin/Unreal3.2/ircdcron/ircdchk >/dev/null 2>&1
*/2 * * * * /home/czar/bin/anope/data/services.chk >/dev/null 2>&1
czar@kremlin:~/bin/anope/data/backups$ cat /home/czar/bin/anope/data/services.chk
#!/bin/sh
# Crontab script for Anope
#
# To know how to install the crontab, read the INSTALL file.
###############################################################
# CONFIGURATION
###############################################################
# Anope binary directory
ANOPATH=/home/czar/bin/anope/bin
# Name of the pid file
ANOPIDF=services.pid
# Name of the executable
ANOPROG=services
# Parameters to pass to the executable
ANOARGS=""
#ANOARGS="-debug"
###############################################################
# DON'T EDIT ANYTHING BELOW #
###############################################################
PATH=/bin:/usr/bin:/usr/local/bin
ANOPID=
cd $ANOPATH
if [ -f $ANOPIDF ]
then
ANOPID=`cat $ANOPIDF`
if [ `ps auwx | grep $ANOPROG | grep $ANOPID | grep -v -c grep` = 1 ]
then
exit
fi
rm -f $ANOPIDF
fi
./$ANOPROG $ANOARGS