Delete pfatt-5268AC
This commit is contained in:
parent
e3bc5d43e5
commit
611bc4d707
1 changed files with 0 additions and 50 deletions
|
@ -1,50 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
script_path="/root/bin/pfatt-5268AC.sh"
|
|
||||||
|
|
||||||
name=`/usr/bin/basename "${script_path}"`
|
|
||||||
|
|
||||||
rc_start() {
|
|
||||||
### Lock out other start signals until we are done
|
|
||||||
/usr/bin/touch /var/run/${name}.lck
|
|
||||||
|
|
||||||
${script_path} &
|
|
||||||
pid=$!
|
|
||||||
|
|
||||||
if [ $pid ]; then
|
|
||||||
echo $pid > /var/run/${name}.pid
|
|
||||||
/usr/bin/logger -p daemon.info -i -t pfattStartup "Successfully started ${name}"
|
|
||||||
else
|
|
||||||
/usr/bin/logger -p daemon.error -i -t pfattStartup "Error starting ${name}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
### Remove the lock
|
|
||||||
if [ -f /var/run/${name}.lck ]; then
|
|
||||||
/bin/sleep 2
|
|
||||||
/bin/rm /var/run/${name}.lck
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
rc_stop() {
|
|
||||||
if [ -f /var/run/${name}.pid ]; then
|
|
||||||
kill -9 `cat /var/run/${name}.pid`
|
|
||||||
/bin/rm /var/run/${name}.pid
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
case $1 in
|
|
||||||
start)
|
|
||||||
if [ ! -f /var/run/${name}.lck ]; then
|
|
||||||
rc_start
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
stop)
|
|
||||||
rc_stop
|
|
||||||
;;
|
|
||||||
restart)
|
|
||||||
if [ ! -f /var/run/${name}.lck ]; then
|
|
||||||
rc_stop
|
|
||||||
rc_start
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
Loading…
Reference in a new issue