nut: Fix nut-cgi config creation (startup)
Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
This commit is contained in:
parent
44e57d4bdf
commit
58e33b02a8
1 changed files with 6 additions and 2 deletions
|
@ -4,7 +4,7 @@
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
#
|
#
|
||||||
START=51
|
START=60
|
||||||
USE_PROCD=1
|
USE_PROCD=1
|
||||||
|
|
||||||
DEFAULT=/etc/default/nut
|
DEFAULT=/etc/default/nut
|
||||||
|
@ -53,13 +53,17 @@ service_reload() {
|
||||||
config_foreach nut_upscgi_add host
|
config_foreach nut_upscgi_add host
|
||||||
config_foreach nut_upscgi_upsset upsset
|
config_foreach nut_upscgi_upsset upsset
|
||||||
|
|
||||||
chmod 640 /var/etc/nut/hosts.conf
|
[ -s "$UPSCGI_C" ] && chmod 640 "$UPSCGI_C"
|
||||||
}
|
}
|
||||||
|
|
||||||
start_service() {
|
start_service() {
|
||||||
service_reload
|
service_reload
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reload_service() {
|
||||||
|
service_reload
|
||||||
|
}
|
||||||
|
|
||||||
stop_service() {
|
stop_service() {
|
||||||
rm -f "$UPSCGI_C"
|
rm -f "$UPSCGI_C"
|
||||||
rm -f "$UPSCGI_S"
|
rm -f "$UPSCGI_S"
|
||||||
|
|
Loading…
Reference in a new issue