4
mirror of git://git.acid.vegas/anope.git synced 2024-11-27 01:56:38 +00:00

Added anope crontab/systemd timer check script

This commit is contained in:
Dionysus 2023-05-07 14:59:25 -04:00
parent 45be6747c9
commit 8eaca168b3
Signed by: acidvegas
GPG Key ID: EF4B922DB85DC9DE

24
data/services.chk Executable file
View File

@ -0,0 +1,24 @@
#!/bin/sh
ANOPATH=/home/ircd/services/bin
ANODATA=/home/ircd/services/data
ANOPIDF=services.pid
ANOPROG=services
ANOARGS=""
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