This directory contains the NUT support files for systemd, the System and
Service Manager used in many Linux distributions.
These files are automatically installed, upon detection (at configure time)
of a systemd enabled target system, or if corresponding configuration options
were requested.
If you need to tweak some of the services, prefer to use systemd "drop-in" configuration files rather than editing the installed unit files directly (lest your changes be lost upon upgrade), e.g.:
# cat /etc/systemd/system/nut-monitor.service.d/debug.conf [Service] Environment="NUT_DEBUG_PID=true" #Environment="NUT_DEBUG_PROCNAME=true"
…followed up by systemctl daemon-reload and a restart of the unit itself.
This also uses the nut-driver-enumerator.sh (service and implementation
method) and upsdrvsvcctl (tool) to manage NUT drivers as service instances
located in ../upsdrvsvcctl/ source subdirectory.
Two service bundles are provided for this:
-
a set of
nut-driver-enumerator-daemon*units starts the script as a daemon to regularly inspect and apply the NUT configuration to OS service unit wrappings (mainly intended for monitoring systems with a dynamic set of monitored power devices, or for systems where filesystem events monitoring is not a clockwork-reliable mechanism to 100% rely on); -
the other
nut-driver-enumerator.*units run the script once per triggering of the service (usually during boot-up; configuration file changes can be detected and propagated by systemd most of the time).
-
Contributed by Michal Hlavinka <mhlavink@redhat.com>
-
Updated 2016-2018 by Michal Hrusecky and Jim Klimov <EvgenyKlimov@eaton.com>
-
Maintained since 2020 by Jim Klimov <jimklimov+nut@gmail.com>