<feed xmlns='http://www.w3.org/2005/Atom'>
<title>packages/net/nut/files/nut-sendmail-notify.default, branch master</title>
<subtitle>Mirror of packages feed</subtitle>
<id>https://git.openwrt.org/feed/packages/atom?h=master</id>
<link rel='self' href='https://git.openwrt.org/feed/packages/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/'/>
<updated>2026-04-27T08:42:36Z</updated>
<entry>
<title>nut: ensure correct upsmon settings names</title>
<updated>2026-04-27T08:42:36Z</updated>
<author>
<name>Daniel F. Dickinson</name>
</author>
<published>2026-03-17T02:54:39Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/commit/?id=0c88118ad4bb303b811975925641357e69f6736b'/>
<id>urn:sha1:0c88118ad4bb303b811975925641357e69f6736b</id>
<content type='text'>
Prompted by
https://github.com/openwrt/luci/pull/8420#issuecomment-4071252681
we update upsmon configs to ensure they are correct according to
upstream. We reorder the options so that they match upstream
documentation at
&lt;https://networkupstools.org/docs/man/upsmon.conf.html&gt; to be sure
we have not missed any items.
While at it, we add configuration options from the upstream
documentation that are not currently present in the UCI configs.

Some years ago upstream changed the names the primary/secondary
UPS system/monitor from master/slave to primary/secondary. It
is uncertain how much longer these deprecated names will be
accepted by NUT.
Therefore update naming to match upstream documentation and
configuration. See
&lt;https://networkupstools.org/docs/man/upsmon.html&gt;,
&lt;https://networkupstools.org/docs/man/upsmon.conf.html&gt;, and
&lt;https://networkupstools.org/docs/man/upsd.users.html&gt;.

At the same time, prompted by
https://github.com/openwrt/packages/pull/28875#issuecomment-4079307540
we simplify the configuration and add checks to avoid bad configs
due to misspellings/typos of configuation options by users.

A sample config

config upsmon 'upsmon'
       option notifycmd '/usr/bin/logger -t nut-monitor-exec '

config monitor
        option type primary
        option upsname upsname
        option hostname localhost
        option username upsuser
        option password upspassword

config notifications 'ONLINE'
        option message "UPS %s is on line power"
        option flag "SYSLOG"

config notifications 'ONBATT'
        option message "UPS %s is on battery power"
        option flag "SYSLOG+EXEC"

In order to iterate through the notifications, we use named
'notifications' sections and compare the section name to list of
notification events defined by NUT. If they don't match, warn
during initscript startup.

Signed-off-by: Daniel F. Dickinson &lt;dfdpublic@wildtechgarden.ca&gt;
</content>
</entry>
<entry>
<title>nut: initscripts hotplug: Fix many small semantic issues</title>
<updated>2019-01-20T17:16:28Z</updated>
<author>
<name>Daniel F. Dickinson</name>
</author>
<published>2019-01-16T12:09:13Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/commit/?id=d7db15459f222ef1b5878c543a01a78fb55a73a7'/>
<id>urn:sha1:d7db15459f222ef1b5878c543a01a78fb55a73a7</id>
<content type='text'>
Small but important tweaks to fix the operation of the nut initscripts
and hotplug scripts.  All hail shellcheck and proofreading and
dogfooding.

Signed-off-by: Daniel F. Dickinson &lt;cshored@thecshore.com&gt;
</content>
</entry>
<entry>
<title>net-nut: Add UPS notifications via sendmail</title>
<updated>2017-01-11T23:54:40Z</updated>
<author>
<name>Daniel Dickinson</name>
</author>
<published>2017-01-11T23:54:40Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/commit/?id=c94e334c4e5251d09995e3f6c8b80d61928a451c'/>
<id>urn:sha1:c94e334c4e5251d09995e3f6c8b80d61928a451c</id>
<content type='text'>
Add option to send email notification via sendmail
(or replacement).

Signed-off-by: Daniel Dickinson &lt;lede@cshore.thecshore.com&gt;
</content>
</entry>
</feed>
