标题:配制lighttpd+fastcgi启动脚本 出处:运维进行时 时间:Thu, 22 May 2008 16:48:12 +0000 作者:root 地址:https://blog.liuts.com/post/103/ 内容: 一、vi /etc/init.d/webserver #!/bin/bash # chkconfig: 35 95 1 # description: script to start/stop/restart webserver case $1 in start) /usr/local/lighttpd/sbin/lighttpd -f /usr/local/lighttpd/etc/lighttpd.conf cd /www/webserver && /usr/local/bin/python ./manage.py runfcgi method=threaded host=127.0.0.1 port=3033 ;; stop) killall lighttpd kill -9 `ps -ef|grep manage.py|grep -v grep|awk {'print $2'}` ;; restart) killall lighttpd kill -9 `ps -ef|grep manage.py|grep -v grep|awk {'print $2'}` sleep 1 /usr/local/lighttpd/sbin/lighttpd -f /usr/local/lighttpd/etc/lighttpd.conf cd /www/webserver && /usr/local/bin/python ./manage.py runfcgi method=threaded host=127.0.0.1 port=3033 ;; *) echo "Usage: $0 (start|stop|restart)" ;; esac 二、配置成服务 引用 chmod 775 webserver chkconfig --add webserver service webserver restart Generated by Bo-blog 2.1.1 Release