Advertising
- Unnamed
- Sunday, December 2nd, 2007 at 7:19:51pm UTC
- #!/bin/sh
- # Crontab script for Anope
- # Anope binary directory
- ANOPATH=/home/ircd/services/daemon/
- # Name of the pid file
- ANOPIDF=services.pid
- # Name of the executable
- ANOPROG=services
- PATH=/bin:/usr/bin:/usr/local/bin
- ANOPID=
- cd $ANOPATH
- if [ -f $ANOPIDF ]
- then
- # If pid file is found
- ANOPID=`cat $ANOPIDF`
- if [ `ps auwx | grep $ANOPROG | grep $ANOPID | grep -v -c grep` = 1 ]
- then
- # services.pid is found and is running...
- # exit silently ;-)
- exit
- fi
- # If pid exists, but isn't found running...
- echo "Anope Crontab notice:"
- echo ""
- echo "Stale $ANOPIDF file (erasing it)."
- echo ""
- # remove it
- rm -f $ANOPIDF
- fi
- # If the pid file isn't found...start anope...
- echo "Anope Crontab notice:"
- echo ""
- echo "Couldn't find the services running. Reloading it..."
- echo ""
- ./$ANOPROG
advertising
Update the Post
Either update this post and resubmit it with changes, or make a new post.
You may also comment on this post.
Please note that information posted here will not expire by default. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.