mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 15:33:54 +01:00
construct: Add program option for single user mode.
This commit is contained in:
parent
01f248105d
commit
092cb5d804
2 changed files with 12 additions and 0 deletions
|
@ -19,6 +19,7 @@
|
||||||
bool printversion;
|
bool printversion;
|
||||||
bool cmdline;
|
bool cmdline;
|
||||||
bool quietmode;
|
bool quietmode;
|
||||||
|
bool single;
|
||||||
bool debugmode;
|
bool debugmode;
|
||||||
bool nolisten;
|
bool nolisten;
|
||||||
bool noautomod;
|
bool noautomod;
|
||||||
|
@ -46,6 +47,7 @@ lgetopt opts[]
|
||||||
{ "version", &printversion, lgetopt::BOOL, "Print version and exit" },
|
{ "version", &printversion, lgetopt::BOOL, "Print version and exit" },
|
||||||
{ "debug", &debugmode, lgetopt::BOOL, "Enable options for debugging" },
|
{ "debug", &debugmode, lgetopt::BOOL, "Enable options for debugging" },
|
||||||
{ "quiet", &quietmode, lgetopt::BOOL, "Suppress log messages at the terminal." },
|
{ "quiet", &quietmode, lgetopt::BOOL, "Suppress log messages at the terminal." },
|
||||||
|
{ "single", &single, lgetopt::BOOL, "Single user mode for maintenance and diagnostic." },
|
||||||
{ "console", &cmdline, lgetopt::BOOL, "Drop to a command line immediately after startup" },
|
{ "console", &cmdline, lgetopt::BOOL, "Drop to a command line immediately after startup" },
|
||||||
{ "execute", &execute, lgetopt::STRING, "Execute command lines immediately after startup" },
|
{ "execute", &execute, lgetopt::STRING, "Execute command lines immediately after startup" },
|
||||||
{ "nolisten", &nolisten, lgetopt::BOOL, "Normal execution but without listening sockets" },
|
{ "nolisten", &nolisten, lgetopt::BOOL, "Normal execution but without listening sockets" },
|
||||||
|
@ -438,6 +440,13 @@ enable_coredumps()
|
||||||
void
|
void
|
||||||
applyargs()
|
applyargs()
|
||||||
{
|
{
|
||||||
|
if(single)
|
||||||
|
{
|
||||||
|
nolisten = true;
|
||||||
|
write_avoid = true;
|
||||||
|
cmdline = true;
|
||||||
|
}
|
||||||
|
|
||||||
if(read_only)
|
if(read_only)
|
||||||
ircd::read_only.set("true");
|
ircd::read_only.set("true");
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,9 @@
|
||||||
Start the daemon with one or more of the following program options to make it
|
Start the daemon with one or more of the following program options to make it
|
||||||
easier to troubleshoot and perform maintenance:
|
easier to troubleshoot and perform maintenance:
|
||||||
|
|
||||||
|
- *-single* will start in "single user mode" which is a convenience combination
|
||||||
|
of *-nolisten -wa -console* options described below.
|
||||||
|
|
||||||
- *-nolisten* will disable the loading of any listener sockets during startup.
|
- *-nolisten* will disable the loading of any listener sockets during startup.
|
||||||
|
|
||||||
- *-wa* write-avoid will discourage (but not deny) writes to the database. This
|
- *-wa* write-avoid will discourage (but not deny) writes to the database. This
|
||||||
|
|
Loading…
Reference in a new issue