重启lighttpd进程的脚本

#!/bin/sh
HTTPD_PID=`cat /tmp/hideto-lighttpd-9527.pid`
SUCCEED_FLAG="Syntax OK"
TEST_RESULT=`lighttpd -t -f /var/www/vhosts/hideto/conf/lighttpd/9527.conf`
echo $TEST_RESULT;
if [ "$TEST_RESULT" = "$SUCCEED_FLAG" ]; then
    echo "Now stopping lighttpd at 9527...";
    kill -INT $HTTPD_PID
    echo "Starting new lighttpd at 9527..."
    lighttpd -f /var/www/vhosts/hideto/conf/lighttpd/9527.conf &
    echo "9527 done."
else
    echo "Config Error, nothing to do. Please change your config and retry";
fi

你可能感兴趣的:(脚本,F#,lighttpd)