2011-09-29 21:14:46 +03:00
|
|
|
[Unit]
|
|
|
|
Description=Network UPS Tools - power devices information server
|
2022-07-10 10:23:45 +03:00
|
|
|
After=local-fs.target network.target nut-driver.target
|
2015-04-30 16:53:36 +03:00
|
|
|
# We don't Require drivers to be successfully started! This would be
|
|
|
|
# a change of behavior compared to init SysV, and could prevent from
|
|
|
|
# accessing successfully started, at least to audit a system.
|
2022-07-10 10:23:45 +03:00
|
|
|
Wants=nut-driver.target
|
|
|
|
# The `upsd` is a networked service (even if bound to a `localhost`)
|
|
|
|
# so it requires that the OS has some notion of networking already.
|
|
|
|
# Extending the unit does not require *this* file to be edited, you
|
|
|
|
# can instead drop in an additional piece of configuration, e.g. add
|
|
|
|
# a `/etc/systemd/system/nut-server.service.d/network.conf` with:
|
|
|
|
# [Unit]
|
|
|
|
# Requires=network-online.target
|
|
|
|
# After=network-online.target
|
|
|
|
Requires=network.target
|
2011-09-29 21:14:46 +03:00
|
|
|
Before=nut-monitor.service
|
2022-07-10 10:23:45 +03:00
|
|
|
PartOf=nut.target
|
2011-09-29 21:14:46 +03:00
|
|
|
|
|
|
|
[Service]
|
2022-07-10 10:23:45 +03:00
|
|
|
EnvironmentFile=-@CONFPATH@/nut.conf
|
|
|
|
SyslogIdentifier=%N
|
|
|
|
# Note: foreground mode by default skips writing a PID file (and
|
|
|
|
# needs Type=simple); can use "-FF" here to create one anyway:
|
|
|
|
ExecStart=@SBINDIR@/upsd -F
|
|
|
|
ExecReload=@SBINDIR@/upsd -c reload -P $MAINPID
|
2011-09-29 21:14:46 +03:00
|
|
|
|
|
|
|
[Install]
|
2022-07-10 10:23:45 +03:00
|
|
|
WantedBy=nut.target
|