17 lines
501 B
Bash
Executable File
17 lines
501 B
Bash
Executable File
#!/bin/sh
|
|
|
|
install -o root -g nut -m ug=rwx,o= -d /run/nut
|
|
|
|
# To automatically update the host's udev rules for NUT devices,
|
|
# bind-mount /etc/udev/rules.d into the container. Then, create a
|
|
# systemd.path(5) unit to monitor that directory and a
|
|
# systemd.service(5) unit to run `udevadm control --reload` and
|
|
# `udevadm trigger` when changes are detected.
|
|
if mountpoint -q /etc/udev/rules.d; then
|
|
cp -uv /lib/udev/rules.d/*-nut-*.rules /etc/udev/rules.d/
|
|
sleep 1
|
|
fi
|
|
|
|
upsdrvctl start
|
|
exec upsd -FF
|