mirror of
git://git.acid.vegas/anope.git
synced 2024-11-23 16:16:42 +00:00
Added anope crontab/systemd timer check script
This commit is contained in:
parent
45be6747c9
commit
8eaca168b3
24
data/services.chk
Executable file
24
data/services.chk
Executable 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
|
Loading…
Reference in New Issue
Block a user