From e1c81bb404e7319bda3ce713f681d2defb1d43e9 Mon Sep 17 00:00:00 2001 From: Neshura Date: Thu, 28 Dec 2023 22:24:02 +0100 Subject: [PATCH] Added optional Uptime URL with env/.env config. Closes #28 --- src/main.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index cd0c15b..f8aa40d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -269,9 +269,13 @@ fn main() { loop { now = Utc::now(); - if now >= start + Duration::seconds(reload_interval) { // DEBUG was 60 + if now >= start + Duration::seconds(reload_interval) { start = now; + if let Ok(uptime_url) = env::var("UPTIME_URL") { + get(uptime_url); + } + match InterfaceConfig::load() { Ok(new_cfg) => { if ifaces != new_cfg {