From 01eef7a392f9fbb9541b4fa57a2316a8267a1666 Mon Sep 17 00:00:00 2001 From: TehPeGaSuS <25697531+TehPeGaSuS@users.noreply.github.com> Date: Sat, 8 Jun 2024 00:23:44 +0200 Subject: Rename example.chk to cron.example.sh. --- data/CMakeLists.txt | 2 +- data/cron.example.sh | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ data/example.chk | 48 ------------------------------------------------ 3 files changed, 49 insertions(+), 49 deletions(-) create mode 100644 data/cron.example.sh delete mode 100644 data/example.chk (limited to 'data') diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt index fca99879e..9f7e5e665 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -1,6 +1,6 @@ # Only install example.chk and anope.example.conf from this directory # NOTE: I would've had this just find all files in the directory, but that would include files not needed (like this file) -set(DATA example.chk anope.example.conf botserv.example.conf hostserv.example.conf modules.example.conf operserv.example.conf chanserv.example.conf global.example.conf memoserv.example.conf nickserv.example.conf chanstats.example.conf irc2sql.example.conf stats.standalone.example.conf) +set(DATA cron.example.sh anope.example.conf botserv.example.conf hostserv.example.conf modules.example.conf operserv.example.conf chanserv.example.conf global.example.conf memoserv.example.conf nickserv.example.conf chanstats.example.conf irc2sql.example.conf stats.standalone.example.conf) install(FILES ${DATA} DESTINATION ${CONF_DIR} ) 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 diff --git a/data/example.chk b/data/example.chk deleted file mode 100644 index e71928f1c..000000000 --- a/data/example.chk +++ /dev/null @@ -1,48 +0,0 @@ -#!/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 -- cgit