lighttpd: lighttpd.init reload gracefully
authorGlenn Strauss <gstrauss@gluelogic.com>
Fri, 30 Oct 2020 03:13:58 +0000 (23:13 -0400)
committerGlenn Strauss <gstrauss@gluelogic.com>
Mon, 30 Nov 2020 14:27:28 +0000 (09:27 -0500)
reload_server() gracefully with SIGUSR1 to lighttpd
relog() to reopen log files with SIGHUP to lighttpd

Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
net/lighttpd/files/lighttpd.init

index 84a3a18dfe8ca24696ae27100a8d17d861a2e428..1d290063ef33c6f7dc57222370c2a363b387dac2 100644 (file)
@@ -28,6 +28,20 @@ start_service() {
        procd_close_instance
 }
 
+service_triggers() {
+       procd_add_reload_interface_trigger loopback
+       procd_add_reload_interface_trigger lan
+}
+
 reload_service() {
-       procd_send_signal lighttpd
+       # lighttpd graceful restart (SIGUSR1)
+       procd_send_signal lighttpd '*' USR1
 }
+
+relog() {
+       # lighttpd reopen log files (SIGHUP)
+       procd_send_signal lighttpd '*' HUP
+}
+
+EXTRA_COMMANDS="relog"
+EXTRA_HELP="   relog   Reopen log files (without reloading)"