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,7 +9,9 @@ restart() {
}
start_service() {
upsmon -p
mkdir -p /var/run/nut
chmod 700 /var/run/nut
upsmon -p
}
stop_service() {

View File

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