-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 El 2021-04-16 a las 21:48 +0200, Roger Price escribió:
On Fri, 16 Apr 2021, Carlos E. R. wrote:
I'm reading it.
Re "Figure 16: NUT provided script for delayed UPS shutdown." ... «This script is executed late in the system shutdown process, and there is no trace in the systemlog of it’s action. If, like the editor, you believe that shutting off power to a system is a majorevent, and should be logged, then you are invited to replace the script provided by NUT with asystemd service unit as shown in appendix 21 which will log the delayed shutdown command.»
Why not use "logger"?
The service unit nut-delayed-ups-shutdown.service described in appendix 21 does use logger:
Ah, didn't look that far yet. But I mean, the script can also use logger, I do all the time. Needs less complication with enabling services and such ;-)
... [Service] Type=oneshot ExecStart=/usr/bin/logger -t nut-delayed-ups-shutdown "upsdrvctl shutting down UPS" ExecStart=/sbin/upsdrvctl shutdown # Debian ...
Sorry about the Debianism - an opensuse sysadmin would replace /sbin/upsdrvctl by /usr/sbin/upsdrvctl
Oh, it is interesting to see the differences :-) - -- Cheers, Carlos E. R. (from openSUSE 15.2 x86_64 at Telcontar) -----BEGIN PGP SIGNATURE----- iHoEARECADoWIQQZEb51mJKK1KpcU/W1MxgcbY1H1QUCYHnunRwccm9iaW4ubGlz dGFzQHRlbGVmb25pY2EubmV0AAoJELUzGBxtjUfVgc4AmQF2dYRRdhQlQkgvUj14 XLWCXoEbAJ0UbE6khI2jntMrsEIcLuwzhEx5cw== =9mYu -----END PGP SIGNATURE-----