Skip to content

Commit

Permalink
modified S51nut to set correct permissions for upsd.users
Browse files Browse the repository at this point in the history
  • Loading branch information
jens-maus committed Sep 24, 2023
1 parent 0eac91d commit 484d384
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions buildroot-external/overlay/base-raspmatic/etc/init.d/S51nut
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,15 @@ case $1 in
echo -n "Starting NUT services: "

# make sure some necessary state dirs exist
# and that permissions are right
mkdir -p /var/state/ups
chown nut:nut /var/state/ups
chmod 770 /var/state/ups
chmod 0770 /var/state/ups
mkdir -p /var/run/upsd
chown nut:nut /var/run/upsd
chmod 770 /var/run/upsd
chmod 0770 /var/run/upsd
chown nut:nut /etc/config/nut/upsd.users 2>/dev/null
chmod 0600 /etc/config/nut/upsd.users 2>/dev/null

# start the server (upsdrvctl/upsd)
case "${MODE}" in
Expand Down

0 comments on commit 484d384

Please sign in to comment.