mirror of
https://github.com/anope/anope.git
synced 2026-06-20 04:34:47 +02:00
935c1974e8
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2687 5417fbe8-f217-4b02-8779-1006273d7864
48 lines
977 B
Bash
48 lines
977 B
Bash
#!/bin/sh
|
|
|
|
# Crontab script for Anope
|
|
#
|
|
# To know how to install the crontab, read the INSTALL file.
|
|
|
|
###############################################################
|
|
# CONFIGURATION
|
|
###############################################################
|
|
|
|
# Anope binary directory
|
|
ANOPATH=/home/ircd/services/bin
|
|
|
|
# Anope data directory
|
|
ANODATA=/home/ircd/services/data
|
|
|
|
# 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 "$ANODATA/$ANOPIDF" ]
|
|
then
|
|
ANOPID=`cat "$ANODATA/$ANOPIDF"`
|
|
if [ `ps auwx | grep $ANOPROG | grep $ANOPID | grep -v -c grep` = 1 ]
|
|
then
|
|
exit
|
|
fi
|
|
rm -f "$ANODATA/$ANOPIDF"
|
|
fi
|
|
|
|
./$ANOPROG $ANOARGS
|