0
0
Fork 0
mirror of https://git.verdigado.com/NB-Public/simple-wkd.git synced 2024-10-30 01:25:53 +01:00

Create .well-known directory at start

This commit is contained in:
Delta1925 2023-05-20 23:58:11 +02:00
parent e31f1b4073
commit 73288f4b58
No known key found for this signature in database
GPG key ID: 1C21ACE44193CB25

View file

@ -23,7 +23,7 @@ use actix_web::{
use log::{debug, error, info, trace}; use log::{debug, error, info, trace};
use serde::Deserialize; use serde::Deserialize;
use std::fs; use std::fs;
use std::path::Path; use std::path::{Path, PathBuf};
use tokio::{task, time}; use tokio::{task, time};
use utils::{init_logger, pending_path, webpage_path}; use utils::{init_logger, pending_path, webpage_path};
@ -48,6 +48,7 @@ async fn main() -> std::io::Result<()> {
panic!("Could not set up logger!") panic!("Could not set up logger!")
}; };
log_err!(fs::create_dir_all(pending_path()), error)?; log_err!(fs::create_dir_all(pending_path()), error)?;
log_err!(fs::create_dir_all(PathBuf::from(ROOT_FOLDER).join(".well-known")), error)?;
task::spawn(async { task::spawn(async {
let mut metronome = time::interval(time::Duration::from_secs(SETTINGS.cleanup_interval)); let mut metronome = time::interval(time::Duration::from_secs(SETTINGS.cleanup_interval));
loop { loop {