nut: Fix nut-cgi config creation (startup)

Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
This commit is contained in:
Daniel F. Dickinson 2018-10-09 22:11:54 -04:00
parent 44e57d4bdf
commit 58e33b02a8

View file

@ -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"