summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'www-servers/spawn-fcgi/files/spawn-fcgi.initd')
-rw-r--r--www-servers/spawn-fcgi/files/spawn-fcgi.initd9
1 files changed, 6 insertions, 3 deletions
diff --git a/www-servers/spawn-fcgi/files/spawn-fcgi.initd b/www-servers/spawn-fcgi/files/spawn-fcgi.initd
index 574ae86cd03e..3fc89950e2e5 100644
--- a/www-servers/spawn-fcgi/files/spawn-fcgi.initd
+++ b/www-servers/spawn-fcgi/files/spawn-fcgi.initd
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/spawn-fcgi/files/spawn-fcgi.initd,v 1.3 2009/04/04 10:40:24 bangert Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-servers/spawn-fcgi/files/spawn-fcgi.initd,v 1.4 2009/04/07 08:39:00 bangert Exp $
PROGNAME=${SVCNAME#*.}
SPAWNFCGI=/usr/bin/spawn-fcgi
@@ -33,7 +33,7 @@ start() {
fi
local X E OPTIONS SOCKET_OPTION PORT_OPTION RETVAL
-
+
if [ -z "${FCGI_ADDRESS}" ]; then
FCGI_ADDRESS=127.0.0.1
fi
@@ -66,6 +66,9 @@ start() {
[ -n "${j}" ] && E="${E} -e ${i}=${j}"
done
+ #make sure pidfile dir exists
+ install -d "${PIDPATH}" -m 0700 -o root
+
ebegin "Starting FastCGI application ${PROGNAME}"
X=0
while [ $X -lt ${FCGI_CHILDREN} ]; do
@@ -78,7 +81,7 @@ start() {
start-stop-daemon --start --pidfile ${P} ${E} --exec ${SPAWNFCGI} -- \
${SOCKET_OPTION} ${INET_OPTION} -P ${P} ${OPTIONS} -- ${FCGI_PROGRAM}
RETVAL=$?
-
+
# Stop on error. Don't want to spawn a mess!
[ "${RETVAL}" != "0" ] && break
done