On 29/05/2025 10:04, Michael Schwingen wrote:
On 2025-05-23, The Natural Philosopher <[email protected]d> wrote:
I have a shell script that monitors hardware stuff - it needs to run as
root and be called by Apache as user www.
Bookworm linux on a Pi4.
https://github.com/OliveTin/OliveTin
might be worth a look. I only had a short look and have no own experience yet.
Intersting. In the end I added this to /etc/sudoers
#allow www to access to hwinfo.sh
www-data ALL = (ALL) NOPASSWD: /usr/local/scripts/hwinfo.sh
and then invoking
#!/bin/sh
echo "content-type:text/html"
echo
sudo /usr/local/scripts/hwinfo.sh
from a script in /usr/lib/cgi-bin...
Apache and firefox seem happy enough and I can AJAX that from the
browser to get uptodate info.
--
There is nothing a fleet of dispatchable nuclear power plants cannot do
that cannot be done worse and more expensively and with higher carbon
emissions and more adverse environmental impact by adding intermittent renewable energy.
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)