From: Sylvain Monné Date: Mon, 5 Aug 2024 13:40:12 +0000 (+0200) Subject: uhttpd: restart daemon if certificate has changed X-Git-Tag: v24.10.0-rc1~989 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F16076%2Fhead;p=thirdparty%2Fopenwrt.git uhttpd: restart daemon if certificate has changed Fixes #16075 When the SSL certificate used by uhttpd has been changed, calling `/etc/init.d/uhttpd reload` will now have the effect of restarting the daemon to make the change effective. Signed-off-by: Sylvain Monné Link: https://github.com/openwrt/openwrt/pull/16076 Signed-off-by: Robert Marko --- diff --git a/package/network/services/uhttpd/files/uhttpd.init b/package/network/services/uhttpd/files/uhttpd.init index 6929fef421d..c6e0b210c5a 100755 --- a/package/network/services/uhttpd/files/uhttpd.init +++ b/package/network/services/uhttpd/files/uhttpd.init @@ -204,6 +204,9 @@ start_instance() append_arg "$cfg" cert "-C" append_arg "$cfg" key "-K" + procd_append_param file "$UHTTPD_CERT" + procd_append_param file "$UHTTPD_KEY" + for listen in $https; do procd_append_param command -s "$listen" done