git: 7cdfb588b4ce - main - www/nginx: add the ability to customize the stop signal
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 07 Jan 2022 13:12:20 UTC
The branch main has been updated by joneum:
URL: https://cgit.FreeBSD.org/ports/commit/?id=7cdfb588b4ced018428ce752e88f24e919ceb1aa
commit 7cdfb588b4ced018428ce752e88f24e919ceb1aa
Author: Jochen Neumeister <joneum@FreeBSD.org>
AuthorDate: 2022-01-07 13:11:05 +0000
Commit: Jochen Neumeister <joneum@FreeBSD.org>
CommitDate: 2022-01-07 13:12:15 +0000
www/nginx: add the ability to customize the stop signal
PR: 254961
Sponsored by: Netzkommune GmbH
---
www/nginx/Makefile | 2 +-
www/nginx/files/nginx.in | 11 +++++++++--
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/www/nginx/Makefile b/www/nginx/Makefile
index afd903ce2ba7..e7ea534daa83 100644
--- a/www/nginx/Makefile
+++ b/www/nginx/Makefile
@@ -2,7 +2,7 @@
PORTNAME= nginx
PORTVERSION= 1.20.2
-PORTREVISION?= 4
+PORTREVISION?= 5
PORTEPOCH= 2
CATEGORIES= www
MASTER_SITES= https://nginx.org/download/ \
diff --git a/www/nginx/files/nginx.in b/www/nginx/files/nginx.in
index ef1c0561e421..37d2c182ebca 100644
--- a/www/nginx/files/nginx.in
+++ b/www/nginx/files/nginx.in
@@ -25,13 +25,15 @@
# nginx_http_accept_enable (bool): Set to "NO" by default.
# Set to yes to check for accf_http kernel module
# on start-up and load if not loaded.
+# nginx_sig_stop (str): Default to "_TERM"
. /etc/rc.subr
name="nginx"
rcvar=nginx_enable
-start_precmd="nginx_precmd"
+start_precmd="nginx_prestart"
+stop_precmd="nginx_prestop"
restart_precmd="nginx_checkconfig"
reload_precmd="nginx_checkconfig"
configtest_cmd="nginx_checkconfig"
@@ -131,7 +133,7 @@ nginx_upgrade()
run_rc_command ${rc_prefix}reload $rc_extra_args || return 1
}
-nginx_precmd()
+nginx_prestart()
{
if checkyesno nginx_http_accept_enable
then
@@ -148,4 +150,9 @@ nginx_precmd()
fi
}
++nginx_prestop()
+{
+ sig_stop="${nginx_sig_stop:-TERM}"
+}
+
run_rc_command "$1"