mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 02:02:38 +01:00
construct: Add -safe (safemode) even less functional alternative to -single.
This commit is contained in:
parent
38e0021fe6
commit
2d2ce9dec5
1 changed files with 9 additions and 0 deletions
|
@ -21,6 +21,7 @@ bool cmdline;
|
|||
std::vector<std::string> 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");
|
||||
|
|
Loading…
Reference in a new issue