New config module
This commit is contained in:
parent
478dc4dd3a
commit
7efa41a48c
2 changed files with 111 additions and 1 deletions
src
|
@ -3,6 +3,7 @@ use reqwest::blocking::get;
|
|||
use serde_derive::{Deserialize, Serialize};
|
||||
use std::{fs, thread::{sleep}};
|
||||
use chrono::{Utc, Duration};
|
||||
mod config;
|
||||
mod cloudflare;
|
||||
|
||||
fn default_key() -> String {
|
||||
|
@ -359,7 +360,8 @@ fn main() {
|
|||
let mut now = Utc::now() - Duration::seconds(59);
|
||||
let mut current = now;
|
||||
|
||||
loop {
|
||||
let ifaces = config::InterfaceConfig::load().unwrap();
|
||||
let zone_cfgs= config::ZoneConfig::load().unwrap();
|
||||
now = Utc::now();
|
||||
if now >= current + Duration::seconds(60) {
|
||||
current = now;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue