Hi. According to nginx man page:
SIGINT, SIGTERM Shut down quickly. SIGQUIT Shut down gracefully. While I am not a fan of rewriting rc_ functions, I don't think this particular use case warrants new code to implement some new "rc_stop_sig" feature so I propose this to the rc.d script (and fix the reload case to add the proper rtable). OK? Index: Makefile =================================================================== RCS file: /cvs/ports/www/nginx/Makefile,v retrieving revision 1.153 diff -u -p -r1.153 Makefile --- Makefile 25 May 2021 19:43:55 -0000 1.153 +++ Makefile 27 Aug 2021 12:56:50 -0000 @@ -38,6 +38,8 @@ PKGNAME-passenger= nginx-passenger-${VER PKGNAME-rtmp= nginx-rtmp-${VERSION} PKGNAME-securelink= nginx-securelink-${VERSION} +REVISION-main= 0 + ONLY_FOR_ARCHS-passenger= aarch64 amd64 arm i386 MASTER_SITES= https://nginx.org/download/ Index: pkg/nginx.rc =================================================================== RCS file: /cvs/ports/www/nginx/pkg/nginx.rc,v retrieving revision 1.14 diff -u -p -r1.14 nginx.rc --- pkg/nginx.rc 11 Jan 2018 19:27:11 -0000 1.14 +++ pkg/nginx.rc 27 Aug 2021 12:56:50 -0000 @@ -9,7 +9,12 @@ daemon="${TRUEPREFIX}/sbin/nginx" pexp="nginx: master process ${daemon}${daemon_flags:+ ${daemon_flags}}" rc_reload() { - ${daemon} ${daemon_flags} -t && pkill -HUP -xf "${pexp}" + ${daemon} ${daemon_flags} -t && + pkill -HUP -T "${daemon_rtable}" -xf "${pexp}" +} + +rc_stop() { + pkill -QUIT -T "${daemon_rtable}" -xf "${pexp}" } rc_cmd $1 -- Antoine