fix to check if foglamp pid is valid upon startup
@@ -73,10 +73,15 @@ case "$1" in
get_pid
if [ $PID -eq 0 ]; then
foglamp_start
+ else
+ if [ -z "`ps axf | grep ${PID} | grep -v grep`" ]; then
+ rm -f $PID_FILE
+ foglamp_start
else
echo "FogLAMP already running [$PID]"
exit 0
fi
+ fi
get_pid
if [ $PID -eq 0 ]; then
