From e8e435c17023c98ceaa59ad35e711ebfe1e29404 Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Wed, 19 Feb 2025 12:07:38 -0600 Subject: [PATCH] create config file if not found --- monitarr/monitarr/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/monitarr/monitarr/main.cpp b/monitarr/monitarr/main.cpp index f8c928c..1a3f5e8 100644 --- a/monitarr/monitarr/main.cpp +++ b/monitarr/monitarr/main.cpp @@ -38,6 +38,10 @@ namespace monitarr { fmt::format("loading config|{}", cfg_file)); app_config cfg{}; cfg.load(cfg_file); + if (not utils::file::file{cfg_file}.exists()) { + cfg.save(cfg_file); + } + return cfg; } } // namespace monitarr