File: README.adoc

package info (click to toggle)
nut 2.8.3-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 24,356 kB
  • sloc: ansic: 123,904; sh: 14,718; cpp: 12,558; makefile: 5,212; python: 1,114; perl: 855; xml: 47
file content (44 lines) | stat: -rw-r--r-- 1,819 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
NUT resources for systemd integration
=====================================

Overview
--------

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=yes"
----
...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).

Credits
-------

* 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>