Skip to content

Commit

Permalink
www/nginx-devel: able to customize the stop signal
Browse files Browse the repository at this point in the history
Bump PORTREVISION.

PR:	254962
  • Loading branch information
osokin committed Jan 5, 2022
1 parent c0015a9 commit c42df2f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion www/nginx-devel/Makefile
Expand Up @@ -2,7 +2,7 @@

PORTNAME?= nginx
PORTVERSION= 1.21.5
PORTREVISION= 4
PORTREVISION= 5
CATEGORIES= www
MASTER_SITES= https://nginx.org/download/ \
LOCAL/osa
Expand Down
11 changes: 9 additions & 2 deletions www/nginx-devel/files/nginx.in
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand All @@ -148,4 +150,9 @@ nginx_precmd()
fi
}

nginx_prestop()
{
sig_stop="${nginx_sig_stop:-TERM}"
}

run_rc_command "$1"

0 comments on commit c42df2f

Please sign in to comment.