Added optional Uptime URL with env/.env config. Closes #28
All checks were successful
Run Tests on Code / run-tests (push) Successful in 11s

This commit is contained in:
Neshura 2023-12-28 22:24:02 +01:00
parent 33f36adf3f
commit e1c81bb404
Signed by: Neshura
GPG key ID: B6983AAA6B9A7A6C

View file

@ -269,9 +269,13 @@ fn main() {
loop { loop {
now = Utc::now(); now = Utc::now();
if now >= start + Duration::seconds(reload_interval) { // DEBUG was 60 if now >= start + Duration::seconds(reload_interval) {
start = now; start = now;
if let Ok(uptime_url) = env::var("UPTIME_URL") {
get(uptime_url);
}
match InterfaceConfig::load() { match InterfaceConfig::load() {
Ok(new_cfg) => { Ok(new_cfg) => {
if ifaces != new_cfg { if ifaces != new_cfg {