1
0
Fork 0
nut-docker/entrypoint.sh

13 lines
362 B
Bash
Raw Normal View History

2021-01-02 16:54:47 +01:00
#!/bin/bash
sed -i 's/MODE=none/MODE=netserver/g' /etc/nut/nut.conf
echo "LISTEN 0.0.0.0 3493" >> /etc/nut/upsd.conf
echo -e "[$NAME] \n driver = $DRIVER \n port = $PORT \n pollfreq = $POLLFREQ \n desc = $DESC" >> /etc/nut/ups.conf
2021-01-08 12:50:14 +01:00
echo -e "$USERSSTRING" >> /etc/nut/upsd.users
2021-01-02 16:54:47 +01:00
chgrp nut /etc/nut/*
chgrp nut /dev/bus/usb/*/*
upsdrvctl start
exec upsd -D