Daniel F. Dickinson 90d3d1e9d0 nut: fix driver, server, and monitor reload/stop
Updated configuration was not being applied after config change. This
was due to the means used to do the daemon reloads.

Closes #28298 "Drivers not restarted on config change"

Enable creating PID files for the server, driver, and monitor daemon
processes. This allows to use NUT's built-in facilities for signalling
the daemon's.

For server, when reloading:
1. Check if upsd is running
   1. If not, start it.
   2. If it is send reload signal to upsd
2. For each driver:
   1. Check if the driver is running
      1. If it is, send reload-or-exit signal to driver
      2. If driver is not running, start it
3. Attempt to start server (upsd and drivers) if service was stopped.

For server, when stopping:
1. Check if upsd is running
   1. If it is send stop signal to upsd
   2. Ensure it really is stopped
2. For each driver:
   1. Check if the driver is running
      1. If it is, send stop signal to driver
      2. If driver is still running, stop it.
3. If the server process is active (even with not upsd or drivers),
   stop it.

For monitor, send the reload signal on config change, with fallback to
stopping and starting the daemon.

Change the names of variables and functions to make it more clear what
is being acted on, configured, or otherwise touched.

Avoid confusing messages in syslog

* Avoid attempting to remove a procd server instance that does not exist
  as doing so results in confusing/scary messages in syslog, such as:

  Command failed: ubus call service delete
  { "name": "nut-server", "instance": "upsd" } (Not found)

In NUT some models of UPS use shutdown_delay rather than offdelay, and
yet others use usd for the same purpose. shutdown_delay and usd were
previously not available in the list of available driver options, so
add them.

Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
2026-03-03 19:53:14 +01:00
2026-01-30 23:07:25 +02:00
2026-02-28 17:21:43 +02:00
2026-02-19 20:15:36 +02:00
2026-02-23 15:14:17 +07:00
2026-02-21 22:27:11 +00:00
2026-02-11 19:17:22 +00:00

OpenWrt packages feed

Description

This is the OpenWrt "packages"-feed containing community-maintained build scripts, options and patches for applications, modules and libraries used within OpenWrt.

Installation of pre-built packages is handled directly by the opkg utility within your running OpenWrt system or by using the OpenWrt SDK on a build system.

Usage

This repository is intended to be layered on-top of an OpenWrt buildroot. If you do not have an OpenWrt buildroot installed, see the documentation at: OpenWrt Buildroot Installation on the OpenWrt support site.

This feed is enabled by default. To install all its package definitions, run:

./scripts/feeds update packages
./scripts/feeds install -a -p packages

License

See LICENSE file.

Package Guidelines

See CONTRIBUTING.md file.

Description
Community maintained packages for OpenWrt. Documentation for submitting pull requests is in CONTRIBUTING.md
Readme GPL-2.0 176 MiB
Languages
Makefile 51.9%
Shell 32.7%
C 7.7%
UnrealScript 3%
C++ 1.8%
Other 2.7%