Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 98349 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.44 KB, created by
James Le Cuirot
on 2006-09-28 17:46:45 UTC
(
hide
)
Description:
spawn-fcgi init script
Filename:
MIME Type:
Creator:
James Le Cuirot
Created:
2006-09-28 17:46:45 UTC
Size:
2.44 KB
patch
obsolete
>#!/sbin/runscript ># Copyright 1999-2006 Gentoo Foundation ># Distributed under the terms of the GNU General Public License v2 ># $Header: $ > >FILENAME=$(basename "$1") >PROGNAME=${FILENAME/fcgi./} >SPAWNFCGI=/usr/bin/spawn-fcgi >PIDPATH=/var/run/spawn-fcgi >PIDFILE=${PIDPATH}/${PROGNAME} > >depend() { > need net >} > >start() { > if [[ "${FILENAME}" == "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 > eerror "The new name must start with \"fcgi.\" or it won't work." > return 1 > fi > > local X E PHP_FCGI_CHILDREN_OPTION USER_OPTION GROUP_OPTION SOCKET_OPTION PORT_OPTION RETVAL > > if [[ -z "${FCGI_WEB_SERVER_ADDRS}" ]]; then > FCGI_WEB_SERVER_ADDRS=127.0.0.1 > fi > > if [[ -n "${PHP_FCGI_CHILDREN}" ]]; then > PHP_FCGI_CHILDREN_OPTION="-C ${PHP_FCGI_CHILDREN}" > fi > > if [[ -z "${FCGI_CHILDREN}" ]]; then > FCGI_CHILDREN=1 > fi > > if [[ -n "${FCGI_USER}" ]] && [[ "${FCGI_USER}" != "root" ]]; then > USER_OPTION="-u ${FCGI_USER}" > fi > > if [[ -n "${FCGI_GROUP}" ]] && [[ "${FCGI_GROUP}" != "root" ]]; then > GROUP_OPTION="-g ${FCGI_GROUP}" > fi > > ALLOWED_ENV="$ALLOWED_ENV USER GROUPS PHP_FCGI_MAX_REQUESTS FCGI_WEB_SERVER_ADDRS 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} ${PORT_OPTION} -f ${FCGI_PROGRAM} -P ${PIDFILE}-${X}.pid ${USER_OPTION} ${GROUP_OPTION} ${PHP_FCGI_CHILDREN_OPTION} &> /dev/null > RETVAL=$? > > # Stop on error. Don't want to spawn a mess! > [[ "${RETVAL}" != "0" ]] && break > done > eend ${RETVAL} >} > >stop() { > local X RETVAL > > ebegin "Stopping FastCGI application ${PROGNAME}" > kill `for X in ${PIDFILE}-[0-9]*.pid; do cat $X; echo -n ' '; done` &> /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