aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'www-servers/nginx/files/nginx.initd')
-rw-r--r--www-servers/nginx/files/nginx.initd16
1 files changed, 9 insertions, 7 deletions
diff --git a/www-servers/nginx/files/nginx.initd b/www-servers/nginx/files/nginx.initd
index c5be111..5e2012a 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
+# Copyright 1999-2013 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.7 2013/03/31 01:55:20 robbat2 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}
-
+pidfile=${pidfile:-/run/nginx.pid}
+user=${user:-nginx}
+group=${group:-nginx}
depend() {
need net
@@ -77,8 +78,9 @@ 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 -q -d -m 0755 -o root:root /var/log/nginx
+ checkpath -q -d -m 0755 -o ${user}:${group} /var/tmp/nginx
+ checkpath -q -d -m 0755 -o ${user}:${group} /var/tmp/nginx/{client,proxy,fastcgi,scgi,uwsgi}
ebegin "Checking nginx' configuration"
${command} -c ${nginx_config} -t -q