Add --no-manage-active-runtime flag

This commit is contained in:
Patrick Nicolas
2024-12-01 19:07:46 +01:00
parent 3124d3792a
commit 535ead4503
+5 -1
View File
@@ -204,6 +204,7 @@ pid_t app_pid;
bool quitting_main_loop;
bool do_fork;
bool do_active_runtime;
bool avahi_publish;
guint listener_watch;
@@ -322,7 +323,8 @@ void start_server()
update_fsm(); }, nullptr);
}
runtime_setter.emplace();
if (do_active_runtime)
runtime_setter.emplace();
}
void kill_app()
@@ -913,6 +915,7 @@ int main(int argc, char * argv[])
std::string config_file;
app.add_option("-f", config_file, "configuration file")->option_text("FILE")->check(CLI::ExistingFile);
auto no_active_runtime = app.add_flag("--no-manage-active-runtime")->description("don't set the active runtime on connection");
auto no_instructions = app.add_flag("--no-instructions")->group("");
auto no_fork = app.add_flag("--no-fork")->description("disable fork to serve connection")->group("Debug");
auto no_publish = app.add_flag("--no-publish-service")->description("disable publishing the service through avahi");
@@ -925,6 +928,7 @@ int main(int argc, char * argv[])
CLI11_PARSE(app, argc, argv);
do_active_runtime = not *no_active_runtime;
do_fork = not *no_fork;
avahi_publish = not *no_publish;
if (*no_encrypt)