Sven Hoexter [Mon, 31 Jan 2022 10:38:24 +0000 (11:38 +0100)]
Add a state tracking to envertech portalmonitor
Instead of sending a mail by generating output on every execution
we track the state of setup we receive from the portal. Output
is only created whenever we have a state change. That also enables
us to create "resolve" messages when the state changes back to be
ok.
Introduces a new configuration option `stateFile`.
Sven Hoexter [Fri, 28 Jan 2022 20:14:28 +0000 (21:14 +0100)]
Move from OpenWRT wget to curl
The OpenWRT wget implementation aka uci-fetch did not play along
well with the way the meteocontrol weblog HTTP server closes its
connection. To simplify it all just use curl, we need it anyway here.
Also fix up some spaces superflous port definition in the URL.
Sven Hoexter [Tue, 12 May 2020 21:07:43 +0000 (23:07 +0200)]
use microconverter id only ones
It seems the model I experiemented initially with was wrongly labeled
and had the same serial printed on it twice. A different model I got
my hands on has two consecutive serial numbers, which all makes a lot
more sense.
Sven Hoexter [Thu, 13 Dec 2018 19:00:53 +0000 (20:00 +0100)]
change mpass behaviour when no command is given
In case no command is given we initialize() anyway, so we
can just act on the default[] repository. We just have to
ensure that our "$command" is always set, thus we can not
just use $1 in the main command parsing case conditional.
Sven Hoexter [Sun, 2 Dec 2018 10:15:02 +0000 (11:15 +0100)]
nginx config to set cache-control response header based on a cc request header
Looks out for the request HTTP header "cc", if it's set it takes the header
values verbatim and uses them as the value for a "cache-control" response header.
Allows for a dynamic evaluation of a CDN caching configuration.
Sven Hoexter [Fri, 29 Jul 2016 22:36:39 +0000 (00:36 +0200)]
simple wrapper around ssh for password less logins with passwords
Username and password are extracted from OpenVPN auth-user-pass file
The hostname is expected to be the first argument, all others are just appended
to the ssh command. Nothing is verify, so it's doomed to fail in many ways but
might serve its purpose to allow hassle free logins to certain systems.
Sven Hoexter [Sun, 21 Apr 2013 11:27:10 +0000 (13:27 +0200)]
- rename clean_log() -> cleanup()
- Use cleanup() as general purpose cleanup function which also writes
mails in case of errors and always removes the lockfile.
- Set ERRSTAT = 10 in case the mysql backup isn't finished and report
subsequently as a failed backup.
- Add .log suffix for the logfile.
Sven Hoexter [Wed, 27 Apr 2011 14:20:08 +0000 (16:20 +0200)]
On some systems /var/lock/ is on tmpfs or will be cleaned otherwise
on reboot. So we've to make sure that our subdir in /var/lock is
created with approriate permissions before we touch the lockfile.