2008-06-02

重启lighttpd进程的脚本

关键字: shell 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
评论
发表评论

您还没有登录,请登录后发表评论

hideto
搜索本博客
我的相册
A6bdc31c-c66e-468e-961e-9cc721e82adc-thumb
screenshot
共 1 张
存档
最新评论