diff --git a/data/services.chk b/data/services.chk new file mode 100755 index 0000000..57e742c --- /dev/null +++ b/data/services.chk @@ -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 \ No newline at end of file