feat: Create and set permissions for the /var/run/nut directory before starting NUT services.

This commit is contained in:
2026-02-08 21:04:05 +08:00
parent 6bfe48e9a9
commit 3a272a6ba8
2 changed files with 8 additions and 3 deletions

View File

@@ -9,6 +9,8 @@ restart() {
} }
start_service() { start_service() {
mkdir -p /var/run/nut
chmod 700 /var/run/nut
upsmon -p upsmon -p
} }

View File

@@ -9,6 +9,9 @@ restart() {
} }
start_service() { start_service() {
mkdir -p /var/run/nut
chmod 700 /var/run/nut
chown root:root /var/run/nut
upsdrvctl start upsdrvctl start
upsd upsd
} }