Added optional Uptime URL with env/.env config. Closes #28
All checks were successful
Run Tests on Code / run-tests (push) Successful in 11s
All checks were successful
Run Tests on Code / run-tests (push) Successful in 11s
This commit is contained in:
parent
33f36adf3f
commit
e1c81bb404
1 changed files with 5 additions and 1 deletions
|
@ -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 {
|
||||||
|
|
Loading…
Reference in a new issue