diff options
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/init.cpp b/src/init.cpp index 8bf7d387c..df53ee908 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -221,7 +221,7 @@ static void remove_pidfile() static void write_pidfile() { auto pidfile = Anope::ExpandData(Config->GetBlock("serverinfo")->Get<const Anope::string>("pid")); - if (pidfile.empty()) + if (Anope::NoPID || pidfile.empty()) return; std::ofstream stream(pidfile.str()); @@ -325,6 +325,7 @@ bool Anope::Init(int ac, char **av) Log(LOG_TERMINAL) << " --modulesdir=modules directory"; Log(LOG_TERMINAL) << "-e, --noexpire"; Log(LOG_TERMINAL) << "-n, --nofork"; + Log(LOG_TERMINAL) << "-p, --nopid"; Log(LOG_TERMINAL) << " --nothird"; Log(LOG_TERMINAL) << " --protocoldebug"; Log(LOG_TERMINAL) << "-r, --readonly"; @@ -352,6 +353,9 @@ bool Anope::Init(int ac, char **av) if (GetCommandLineArgument("nothird")) Anope::NoThird = true; + if (GetCommandLineArgument("nopid", 'p')) + Anope::NoPID = true; + if (GetCommandLineArgument("noexpire", 'e')) Anope::NoExpire = true; |