#!/bin/bash
#
# fcgi Startup script for fcgi
#
# processname: fcgi
# Source function library
. /etc/rc.d/init.d/functions
FCGI_DAEMON="/usr/local/bin/spawn-fcgi"
FCGI_PROGRAM="/usr/local/bin/php-cgi"
FCGI_SOCKET="/tmp/php-fastcgi.sock"
FCGI_PIDFILE="/var/run/spawn-fcgi.pid"
PHP_FCGI_CHILDREN=4
PHP_FCGI_MAX_REQUESTS=1000
prog="fcgi"
export PHP_FCGI_CHILDREN PHP_FCGI_MAX_REQUESTS
RETVAL=0
start() {
echo -n $"Starting $prog: "
daemon $FCGI_DAEMON -f $FCGI_PROGRAM -s $FCGI_SOCKET -C $PHP_FCGI_CHILDREN -P $FCGI_PIDFILE
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
return $RETVAL
}
stop() {
echo -n $"Stopping $prog: "
rm -f $FCGI_PIDFILE $FCGI_SOCKET
killproc $FCGI_PROGRAM
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
return $RETVAL
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
condrestart)
if [ -f /var/lock/subsys/$prog ]; then
stop
start
fi
;;
status)
status $lighttpd
RETVAL=$?
;;
*)
echo $"Usage: $0 {start|stop|restart|condrestart|status}"
RETVAL=1
esac
exit $RETVAL
Smilar Posts of fastcgi init script on centos
-
js form validation Guinness
js form validation Guinness 1. Length <script> function test () ( if (document.abvalue.length> 50) ( alert ( "Can not more than 50 characters!"); document.abfocus (); return false; ...
-
flash chart summary
pen Flash Chart is an open source Flash chart drawing tool, offers a variety of programming interfaces, including PHP, Ruby, Perl, Python, Java,. Net, AS, JS, etc. to generate a variety of data interf ...
-
IBM Ajax Tutorial Series
Links: http://ibm.csdn.net/ISN_J.aspx?action=JMP&pointid=1550 Part 10: Using JSON for data transmission In the asynchronous application to send and receive information, you can choose to plain tex ...
-
jquery ajax example
1. Check js file $. ajax (( type: "GET", url: "test.js", dataType: "script" )) 2.post data $. ajax (( type: "POST", url: "xxxx", data: "name = zh ...
-
Strength of live practice teaching materials, suitable for each person team look - UFIDA Hua Table CTO talk about "out of the software factory"
A few months ago, on reading "Going the software factory," one book, not yet published at that time, it can be considered the reference of the watch. Although the language rather uneventful, ...
-
Hibernate query: HQL and Criteria
HQL query methods generally used in more general way through the query query. Examples are as follows: The Criteria is a more than HQL query object-oriented approach: Created as follows: Criteria crit ...
-
Workspace run under different Eclipse
Now do live more and more often required to use eclipse in java and ruby & rails project conducted between the tangential shear from the past, because in the rails project used a coloring Aptana prefe ...
-
Software development sunflower Baodian [reprint]
Master the ability to reuse code very familiar with the new API's fast. This is because, he once used a lot of the API, have a lot of reusable code. He knows what is available and what is deficien ...
-
can not be represented as java.sql.Timestamp
Development of procedures for the use of hibernate when, some time there is no need to fill in the fields, but after the hibernate query time reported "Java.sql.SQLException: Value'0000-00-00 ' ...
-
Struts2 + hibernate + spring problem user log in
dao layer services layer action jsp user name: Password:







