A simple shell script to check lshttpd and start LSWS, create a cron job.
#!/bin/sh
ERR=1
if [ -f /tmp/lshttpd/lshttpd.pid ]; then
kill -0 `cat /tmp/lshttpd/lshttpd.pid`
ERR=$?
fi
if [ $ERR -ne 0 ]; then
/opt/lsws/bin/lswsctrl start
D=`date`
echo "$D: LSWS stopped, start...