54 lines
1.1 KiB
Plaintext
54 lines
1.1 KiB
Plaintext
package nut
|
|
|
|
import "du5t1n.me/cfg/app/containerudev"
|
|
|
|
templates: containerudev.templates + [
|
|
{
|
|
template: "nut/nut.sysusers"
|
|
dest: "/etc/sysusers.d/nut.conf"
|
|
hooks: {
|
|
changed: [{
|
|
run: "systemd-sysusers /etc/sysusers.d/nut.conf"
|
|
immediate: true
|
|
}]
|
|
}
|
|
},
|
|
{
|
|
template: "nut/ups.conf"
|
|
dest: "/etc/ups/ups.conf"
|
|
hooks: {
|
|
changed: [{run: "systemctl try-restart nut-server"}]
|
|
}
|
|
},
|
|
{
|
|
template: "nut/upsd.conf"
|
|
dest: "/etc/ups/upsd.conf"
|
|
owner: "root"
|
|
group: "nut"
|
|
mode: "u=rw,g=r,o="
|
|
hooks: {
|
|
changed: [{run: "systemctl try-reload-or-restart nut-server"}]
|
|
}
|
|
},
|
|
{
|
|
template: "nut/upsd.users"
|
|
dest: "/etc/ups/upsd.users"
|
|
owner: "root"
|
|
group: "nut"
|
|
mode: "u=rw,g=r,o="
|
|
hooks: {
|
|
changed: [{run: "systemctl try-reload-or-restart nut-server"}]
|
|
}
|
|
},
|
|
{
|
|
template: "nut/nut-server.container"
|
|
dest: "/etc/containers/systemd/nut-server.container"
|
|
hooks: {
|
|
changed: [
|
|
{run: "systemctl daemon-reload", immediate: true},
|
|
{run: "systemctl restart nut-server"},
|
|
]
|
|
}
|
|
},
|
|
]
|