From 2d2ce9dec552a6b8da97dd9cd0c841832a79f1d3 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Tue, 3 Nov 2020 11:07:01 -0800 Subject: [PATCH] construct: Add -safe (safemode) even less functional alternative to -single. --- construct/construct.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/construct/construct.cc b/construct/construct.cc index d1885d8b3..9cc6edccb 100644 --- a/construct/construct.cc +++ b/construct/construct.cc @@ -21,6 +21,7 @@ bool cmdline; std::vector execute; bool quietmode; bool single; +bool safemode; bool debugmode; bool nolisten; bool nobackfill; @@ -53,6 +54,7 @@ lgetopt opts[] { "debug", &debugmode, lgetopt::BOOL, "Enable options for debugging" }, { "quiet", &quietmode, lgetopt::BOOL, "Suppress log messages at the terminal" }, { "single", &single, lgetopt::BOOL, "Single user mode for maintenance and diagnostic" }, + { "safe", &safemode, lgetopt::BOOL, "Safe mode; like -single but with even less functionality." }, { "console", &cmdline, lgetopt::BOOL, "Drop to a command line immediately after startup" }, { "execute", &execute, lgetopt::STRINGS, "Execute command lines immediately after startup" }, { "nolisten", &nolisten, lgetopt::BOOL, "Normal execution but without listening sockets" }, @@ -506,6 +508,13 @@ applyargs() if(diagnostic) ircd::diagnostic.set(diagnostic); + if(safemode) + { + single = true; + nocompact = true; + ircd::server::enable.set("false"); + } + if(single && !bootstrap) { ircd::write_avoid.set("true");