summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2009-12-05 16:27:35 +0000
committercyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2009-12-05 16:27:35 +0000
commit935c1974e80ab2b64d1281a33d2f0663e37ac42c (patch)
treee18ceb1c375fc675a1c9616f45e6ea3e13e4c18f
parentf913188991cb6946d02acb978d6911345340299c (diff)
Fix crontab script to correctly find services.pid, it's not in ~/anope/bin, it's in ~/anope/data.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2687 5417fbe8-f217-4b02-8779-1006273d7864
-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