summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'www-servers/nginx/files/nginx.initd')
-rw-r--r--www-servers/nginx/files/nginx.initd9
1 files changed, 5 insertions, 4 deletions
diff --git a/www-servers/nginx/files/nginx.initd b/www-servers/nginx/files/nginx.initd
index c5be1114a0fb..07473356b6c5 100644
--- a/www-servers/nginx/files/nginx.initd
+++ b/www-servers/nginx/files/nginx.initd
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/files/nginx.initd,v 1.3 2012/11/26 08:12:11 hollow Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/files/nginx.initd,v 1.4 2012/12/10 08:57:32 hollow Exp $
extra_commands="configtest"
extra_started_commands="upgrade reload"
@@ -11,12 +11,13 @@ description_configtest="Run nginx' internal config check."
description_upgrade="Upgrade the nginx binary without losing connections."
description_reload="Reload the nginx configuration without losing connections."
-nginx_config="/etc/nginx/nginx.conf"
+nginx_config=${nginx_config:-/etc/nginx/nginx.conf}
command="/usr/sbin/nginx"
command_args="-c ${nginx_config}"
pidfile=${pidfile:-/var/run/nginx.pid}
-
+user=${user:-nginx}
+group=${group:-nginx}
depend() {
need net
@@ -78,7 +79,7 @@ upgrade() {
configtest() {
checkpath -d -m 0755 -o root:root /var/log/nginx
- checkpath -d -m 0755 -o nginx:nginx /var/tmp/nginx/{client,proxy,fastcgi,scgi,uwsgi}
+ checkpath -d -m 0755 -o ${user}:${group} /var/tmp/nginx/{client,proxy,fastcgi,scgi,uwsgi}
ebegin "Checking nginx' configuration"
${command} -c ${nginx_config} -t -q