-
-
Notifications
You must be signed in to change notification settings - Fork 351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NOTIFYCMD does not work #1760
Comments
Can not confirm (works for me) :\
|
Updated previous test with In combined log stream on console it is mixed like this (note each log is buffered by systemd or OS or whoever, so lines from different streams do come out of order a bit):
|
my upsmon.conf contains:
yes, I did reboot the system many times. This is the fifth time I've reinstalled the flash drive for raspberry(( I have two SD flash drives for one raspberry. The only difference: on one is version 2.7.4 installed via Maybe something is wrong with the instructions, maybe some problem with the rights or users, or folders, I don’t really understand this. There is not a single clear instruction on how to install it correctly on the entire Internet. Everybody do it through an |
By the way, in a recent discussion at #1754 a very detailed set of notes was posted about building and setting up current NUT with Raspbian. Maybe that cross-reference would inspire you about what you did differently? Alas, I can not reproduce the situation exactly since the Raspberry I had some time ago kicked the bucket :( I'm really trying hard to not look snobbish - build systems, CI automation and recipes are my sysadmin bread for decades, so I might consider "apparent" something that you in fact stumble upon and it is hard to guess... Did you bump the debug verbosity to check what |
Thanks for the link, I'm already reading. I will reinstall the SD flash drive again and then increase the debug level. I would like to know exactly under which user it is correct to compile and everything else? |
As long as you specify the On the other hand, when running the daemon programs (upsd, upsmon, drivers...) they usually expect to be started by root and drop privileges into the unprivileged run-time account on their own (possibly after accessing otherwise protected filesystem data etc.). A non-root user may not change to another user; however starting them as the However |
Trying to reproduce with a Debian 11 Bullseye based system, it seems that by default
Regarding the notification script (and maybe
Regarding syslog, on my system it is maintained by
At least, this is also checkable (why |
Looking at https://man7.org/linux/man-pages/man3/popen.3.html and https://www.gnu.org/software/libc/manual/html_node/Running-a-Command.html the user's shell may be irrelevant with GNU libc which calls |
So, thank you very much for your help, I finally beat the problems. The main thing is to create the user and group correctly at the start, thanks #1754
After then:
but it needs to be:
which corresponds to our Now the folder is created correctly and all services start as expected. The only thing is I installed UPS Web Server and it shows the old version 2.7.4. Wondering why?
|
Sounds great! And thanks for the report :) Regarding tmpfiles - it was fixed (different aspects at different times) after 2.8.0 release. So you might want to try builds of the latest and greatest bugfixes (and new bugs, might be) from Git checkouts. There you might need to run It is arguably better formatted but (due to chunking) clumsier to read on the web site: https://networkupstools.org/docs/user-manual.chunked/index.html => https://networkupstools.org/docs/user-manual.chunked/apks02.html#_debian_10_11 As for the website version report - you've just installed |
> As for the website version report - you've just installed nut-cgi from packaging ;)
How to install it from github?
Same (procedurally) as from release tarball - install prerequisites (CGI has a lot due to graphics), build and install it :)
It may help to use `./configure --with-cgipath=...` option to replace the packaged files, so your existing setup for 2.7.4 would "just work".
|
So, back to original topic of this specific issue: after the methodology changes you posted above, did |
Yes, |
A new clean install of version 2.8.0 and notifications do not work and nothing is written to the syslog.
I have an old installation of version 2.7.4 (installed with apt-get) with absolutely identical configs and everything works as expected.
syslog:
I tried both through a custom script and through upssched, checked script privileges (nut:nut), executable, but nothing.
#NOTIFYCMD /etc/nut/notifycmd.sh
NOTIFYCMD /usr/sbin/upssched
The text was updated successfully, but these errors were encountered: