diff options
author | TehPeGaSuS <25697531+TehPeGaSuS@users.noreply.github.com> | 2024-06-08 00:23:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-07 23:23:44 +0100 |
commit | 01eef7a392f9fbb9541b4fa57a2316a8267a1666 (patch) | |
tree | 76ef7001fc8165d4f466b7cbbaf9e1973095fead /data/cron.example.sh | |
parent | 67b76fadca2c3af105e7aff862242971960fa5d5 (diff) |
Rename example.chk to cron.example.sh.
Diffstat (limited to 'data/cron.example.sh')
-rw-r--r-- | data/cron.example.sh | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/data/cron.example.sh b/data/cron.example.sh new file mode 100644 index 000000000..e71928f1c --- /dev/null +++ b/data/cron.example.sh @@ -0,0 +1,48 @@ +#!/bin/sh + +# Crontab script for Anope +# +# To know how to install the crontab, read the INSTALL file. + +############################################################### +# CONFIGURATION +############################################################### + +# Anope binary directory +ANOPATH=/home/ircd/anope/bin + +# Anope data directory +ANODATA=/home/ircd/anope/data + +# Name of the pid file +ANOPIDF=anope.pid + +# Name of the executable +ANOPROG=anope + +# 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"` + kill -0 $ANOPID 2>/dev/null + if [ $? -eq 0 ] + then + exit + fi + rm -f "$ANODATA/$ANOPIDF" +fi + +./$ANOPROG $ANOARGS |