This commit is contained in:
Scott E. Graves 2025-02-19 13:30:51 -06:00
parent cfe240397f
commit 2e34b4030a
3 changed files with 3 additions and 4 deletions

View File

@ -6,8 +6,7 @@
namespace monitarr { namespace monitarr {
struct app_config; struct app_config;
[[nodiscard]] auto run_cmd(const app_config &cfg, std::string_view cfg_file) [[nodiscard]] auto run_cmd(const app_config &cfg) -> int;
-> int;
} // namespace monitarr } // namespace monitarr
#endif // LIBMONITARR_INCLUDE_RUN_CMD_HPP_ #endif // LIBMONITARR_INCLUDE_RUN_CMD_HPP_

View File

@ -52,7 +52,7 @@ auto main(int argc, char **argv) -> int {
} else if (has_arg("-l", argc, argv)) { } else if (has_arg("-l", argc, argv)) {
ret = list_cmd(argc, argv, cfg); ret = list_cmd(argc, argv, cfg);
} else if (has_arg("-r", argc, argv)) { } else if (has_arg("-r", argc, argv)) {
ret = run_cmd(cfg, cfg_file); ret = run_cmd(cfg);
} else if (has_arg("-s", argc, argv)) { } else if (has_arg("-s", argc, argv)) {
ret = show_cmd(argc, argv, cfg); ret = show_cmd(argc, argv, cfg);
} else { } else {

View File

@ -133,7 +133,7 @@ static void check_server(const server_cfg &server, data_db &state_db) {
return state_db; return state_db;
} }
auto run_cmd(const app_config &cfg, std::string_view cfg_file) -> int { auto run_cmd(const app_config &cfg) -> int {
MONITARR_USES_FUNCTION_NAME(); MONITARR_USES_FUNCTION_NAME();
auto ret{0}; auto ret{0};
std::signal(SIGINT, quit_handler); std::signal(SIGINT, quit_handler);