summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/example.chk13
1 files changed, 8 insertions, 5 deletions
diff --git a/data/example.chk b/data/example.chk
index 8e6e4a56e..fbbf4847e 100644
--- a/data/example.chk
+++ b/data/example.chk
@@ -1,7 +1,7 @@
#!/bin/sh
# Crontab script for Anope
-#
+#
# To know how to install the crontab, read the INSTALL file.
###############################################################
@@ -11,6 +11,9 @@
# Anope binary directory
ANOPATH=/home/ircd/services/bin
+# Anope data directory
+ANODATA=/home/ircd/services/data
+
# Name of the pid file
ANOPIDF=services.pid
@@ -31,14 +34,14 @@ ANOPID=
cd $ANOPATH
-if [ -f $ANOPIDF ]
+if [ -f "$ANODATA/$ANOPIDF" ]
then
- ANOPID=`cat $ANOPIDF`
+ ANOPID=`cat "$ANODATA/$ANOPIDF"`
if [ `ps auwx | grep $ANOPROG | grep $ANOPID | grep -v -c grep` = 1 ]
then
- exit
+ exit
fi
- rm -f $ANOPIDF
+ rm -f "$ANODATA/$ANOPIDF"
fi
./$ANOPROG $ANOARGS