View Single Post
  #12  
Old 03-06-2008, 04:00 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
A simple shell script to check lshttpd and start LSWS, create a cron job.
Code:
#!/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 LSWS."
fi
Reply With Quote