SomeWhereOverTheRainBow
Part of the Furniture
Here is probably the best and safest option.
Code:
#!/bin/sh
i=1
pid_loc="$(basename "$0")"
procs="cfg_server"
if [ "$(pidof "$pid_loc" | wc -w)" -gt 1 ]; then exit; fi
while [ "$(pidof "$procs" | wc -w)" -le 3 ]; do sleep 1; done
for pid in "$(pidof "$procs")"; do
if [ "$i" -gt "3" ]; then
#echo $i
#echo $pid
/bin/kill -s 9 $pid
/usr/bin/logger "Running /jffs/sbin/zomg_cfg_server"
fi
i=$((i + 1))
done
Last edited: