From 58e33b02a83c78c42742bc857815899d32d296af Mon Sep 17 00:00:00 2001 From: "Daniel F. Dickinson" Date: Tue, 9 Oct 2018 22:11:54 -0400 Subject: [PATCH] nut: Fix nut-cgi config creation (startup) Signed-off-by: Daniel F. Dickinson --- net/nut/files/nut-cgi.init | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/net/nut/files/nut-cgi.init b/net/nut/files/nut-cgi.init index ceb7cce22..9d408bb6a 100755 --- a/net/nut/files/nut-cgi.init +++ b/net/nut/files/nut-cgi.init @@ -4,7 +4,7 @@ # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # -START=51 +START=60 USE_PROCD=1 DEFAULT=/etc/default/nut @@ -53,13 +53,17 @@ service_reload() { config_foreach nut_upscgi_add host config_foreach nut_upscgi_upsset upsset - chmod 640 /var/etc/nut/hosts.conf + [ -s "$UPSCGI_C" ] && chmod 640 "$UPSCGI_C" } start_service() { service_reload } +reload_service() { + service_reload +} + stop_service() { rm -f "$UPSCGI_C" rm -f "$UPSCGI_S"