From 04536519eed1f9cb6de75f3af808f549fc87e8fc Mon Sep 17 00:00:00 2001 From: Leonardo Arena Date: Fri, 17 Mar 2017 11:12:13 +0000 Subject: Revert "main/nginx: add all modules from testing/nginx-naxsi" This reverts commit e07695e1581744e63bd459f7fa827f51c4d8dbf7. --- main/nginx/nginx.initd | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) (limited to 'main/nginx/nginx.initd') diff --git a/main/nginx/nginx.initd b/main/nginx/nginx.initd index d01874e4f4..992d5fd5b9 100644 --- a/main/nginx/nginx.initd +++ b/main/nginx/nginx.initd @@ -1,15 +1,9 @@ #!/sbin/openrc-run description="Nginx http and reverse proxy server" -description_checkconfig="Verify configuration" -description_upgrade="Upgrade running binary" -description_reload="Reload configuration" -description_reopen="Reopen log files" - -extra_commands="checkconfig" extra_started_commands="reload reopen upgrade" -cfgfile=${NGINX_CONFIG:-/etc/nginx/nginx.conf} +cfgfile=${cfgfile:-/etc/nginx/nginx.conf} pidfile=/run/nginx/nginx.pid command=/usr/sbin/nginx command_args="-c $cfgfile" @@ -20,35 +14,29 @@ depend() { use dns logger netmount } -checkconfig() { - ebegin "Checking $RC_SVCNAME config" - $command $command_args -t - eend $? -} - start_pre() { ebegin - checkpath -d -o ${NGINX_OWNER:-nginx:nginx} ${pidfile%/*} - checkconfig >/dev/null 2>&1 + checkpath --directory --owner nginx:nginx ${pidfile%/*} + $command $command_args -t -q eend $? } reload() { - ebegin "Reloading $RC_SVCNAME configuration" - checkconfig >/dev/null 2>&1 && start-stop-daemon --signal HUP --pidfile $pidfile + ebegin "Reloading ${SVCNAME} configuration" + start_pre && start-stop-daemon --signal HUP --pidfile $pidfile eend $? } reopen() { - ebegin "Reopening $RC_SVCNAME log files" + ebegin "Reopening ${SVCNAME} log files" start-stop-daemon --signal USR1 --pidfile $pidfile eend $? } upgrade() { - checkconfig || return $? + start_pre || return 1 - ebegin "Upgrading $RC_SVCNAME binary" + ebegin "Upgrading ${SVCNAME} binary" einfo "Sending USR2 to old binary" start-stop-daemon --signal USR2 --pidfile $pidfile -- cgit v1.2.3