}
build_server_config() {
- mkdir -m 0755 -p "$(dirname "$UPSD_C")"
+ mkdir -p "$(dirname "$UPSD_C")"
+ chmod 0640 "$UPS_C"
rm -f "$USERS_C"
rm -f "$UPSD_C"
rm -f /var/etc/nut/nut.conf
build_config() {
local STATEPATH=/var/run/nut
- mkdir -m 0755 -p "$(dirname "$UPS_C")"
+ mkdir -p "$(dirname "$UPS_C")"
rm -f "$UPS_C"
echo "# Config file automatically generated from UCI config" > "$UPS_C"
chmod 0640 "$UPS_C"
# If wanting a specific instance, only start it
[ "$requested" != "$cfg" ] && [ x"$requested" != x ] && return 0
- mkdir -m 0755 -p "$(dirname "$UPS_C")"
+ mkdir -p "$(dirname "$UPS_C")"
+ chmod 0755 "$UPS_C"
upsd_statepath
build_config