mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-15 18:03:30 +00:00
18 lines
462 B
Bash
Executable File
18 lines
462 B
Bash
Executable File
#!/bin/sh
|
|
pid_file="/run/pear_restart.pid"
|
|
while true; do
|
|
if [ -f $pid_file ]; then
|
|
pid=$(cat $pid_file)
|
|
if [ -n "$pid" ]; then
|
|
if [ ! -d /proc/$pid ]; then
|
|
logger -t "fogvdn" "fogvdn is not running, restart it"
|
|
/etc/init.d/openfog.sh start
|
|
fi
|
|
fi
|
|
else
|
|
logger -t "fogvdn" "pid file not found, restart it"
|
|
/etc/init.d/openfog.sh start
|
|
fi
|
|
sleep 10
|
|
done
|