Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 158401 Details for
Bug 149467
www-servers/lighttpd: new init script for spawn-fcgi
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
spawn-fcgi init script
spawn-fcgi (text/plain), 2.29 KB, created by
James Le Cuirot
on 2008-06-25 14:35:15 UTC
(
hide
)
Description:
spawn-fcgi init script
Filename:
MIME Type:
Creator:
James Le Cuirot
Created:
2008-06-25 14:35:15 UTC
Size:
2.29 KB
patch
obsolete
>#!/sbin/runscript ># Copyright 1999-2008 Gentoo Foundation ># Distributed under the terms of the GNU General Public License v2 ># $Header: $ > >PROGNAME=${RC_SVCNAME/fcgi./} >SPAWNFCGI=/usr/bin/spawn-fcgi >PIDPATH=/var/run/spawn-fcgi >PIDFILE=${PIDPATH}/${PROGNAME} > >depend() { > need net >} > >start() { > if [[ "${RC_SVCNAME}" == "spawn-fcgi" ]]; then > eerror "You are not supposed to run this script directly. Create a symlink" > eerror "for the FastCGI application you want to run as well as a copy of the" > eerror "configuration file and modify it appropriately like so..." > eerror > eerror " ln -s spawn-fcgi /etc/init.d/fcgi.trac" > eerror " cp /etc/conf.d/spawn-fcgi /etc/conf.d/fcgi.trac" > eerror " `basename "${EDITOR}"` /etc/conf.d/fcgi.trac" > eerror > return 1 > fi > > local X E OPTIONS SOCKET_OPTION PORT_OPTION RETVAL > > if [[ -z "${FCGI_ADDRESS}" ]]; then > FCGI_ADDRESS=127.0.0.1 > fi > > if [[ -z "${FCGI_CHILDREN}" ]]; then > FCGI_CHILDREN=1 > fi > > if [[ -n "${PHP_FCGI_CHILDREN}" ]]; then > OPTIONS="${OPTIONS} -C ${PHP_FCGI_CHILDREN}" > fi > > if [[ -n "${FCGI_CHROOT}" ]]; then > OPTIONS="${OPTIONS} -c ${FCGI_CHROOT}" > fi > > if [[ -n "${FCGI_USER}" ]] && [[ "${FCGI_USER}" != "root" ]]; then > OPTIONS="${OPTIONS} -u ${FCGI_USER}" > fi > > if [[ -n "${FCGI_GROUP}" ]] && [[ "${FCGI_GROUP}" != "root" ]]; then > OPTIONS="${OPTIONS} -g ${FCGI_GROUP}" > fi > > ALLOWED_ENV="$ALLOWED_ENV USER GROUPS PHP_FCGI_MAX_REQUESTS RAILS_ENV TRAC_ENV_PARENT_DIR TRAC_ENV" > unset E > > for i in ${ALLOWED_ENV}; do > [[ -n "${!i}" ]] && E="${E} ${i}=${!i}" > done > > # Store all spawn-fcgi PIDs in the same place. > install -d "${PIDPATH}" -m 0700 -o root > > ebegin "Starting FastCGI application ${PROGNAME}" > for X in `seq 1 ${FCGI_CHILDREN}`; do > [[ -n "${FCGI_SOCKET}" ]] && SOCKET_OPTION="-s ${FCGI_SOCKET}-${X}" > [[ -n "${FCGI_PORT}" ]] && PORT_OPTION="-p $((${FCGI_PORT} + ${X} - 1))" > > env - ${E} ${SPAWNFCGI} ${SOCKET_OPTION} -a ${FCGI_ADDRESS} ${PORT_OPTION} -f ${FCGI_PROGRAM} -P ${PIDFILE}-${X}.pid ${OPTIONS} &> /dev/null > RETVAL=$? > > # Stop on error. Don't want to spawn a mess! > [[ "${RETVAL}" != "0" ]] && break > done > eend ${RETVAL} >} > >stop() { > local RETVAL > > ebegin "Stopping FastCGI application ${PROGNAME}" > kill `cat ${PIDFILE}-[0-9]*.pid` &> /dev/null > RETVAL=$? > eend ${RETVAL} > > rm -f ${PIDFILE}-[0-9]*.pid > return $RETVAL >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 149467
:
98347
|
98348
|
98349
|
158397
|
158401
|
158413
|
158415
|
158417
|
171677
|
183637
|
183638
|
187181
|
187283
|
187285