From a59ed4b39443eb788c15c65501898ca374387e2e Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Mon, 18 Jan 2021 06:56:18 +0000 Subject: Add a new runtime directory and move the pid file to it. The data directory is intended for persistent files whereas the pid file is ephemeral. This distinction doesn't matter by default but on system-wide installs ephemeral runtime files go in /var/run or /run instead. --- src/inspircd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/inspircd.cpp') diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 5760e631b..df5dc8647 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -445,7 +445,7 @@ void InspIRCd::WritePID(const std::string& filename, bool exitonfail) return; } - std::string fname = ServerInstance->Config->Paths.PrependData(filename.empty() ? "inspircd.pid" : filename); + std::string fname = ServerInstance->Config->Paths.PrependRuntime(filename.empty() ? "inspircd.pid" : filename); std::ofstream outfile(fname.c_str()); if (outfile.is_open()) { -- cgit v1.3.1-10-gc9f91 From f9a663185402b9689c784dc87c317ac204c53f03 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Mon, 18 Jan 2021 07:07:50 +0000 Subject: Fix showing the start header when using --version. --- src/inspircd.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/inspircd.cpp') diff --git a/src/inspircd.cpp b/src/inspircd.cpp index df5dc8647..ba7e08eff 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -332,7 +332,7 @@ namespace if (do_version) { - std::cout << std::endl << INSPIRCD_VERSION << std::endl; + std::cout << INSPIRCD_VERSION << std::endl; ServerInstance->Exit(EXIT_STATUS_NOERROR); } @@ -490,6 +490,7 @@ InspIRCd::InspIRCd(int argc, char** argv) this->Config->cmdline.argv = argv; this->Config->cmdline.argc = argc; + ParseOptions(); #ifdef _WIN32 // Initialize the console values @@ -521,7 +522,6 @@ InspIRCd::InspIRCd(int argc, char** argv) << "See " << con_green << "/INFO" << con_reset << " for contributors & authors" << std::endl << std::endl; - ParseOptions(); if (Config->cmdline.forcedebug) { FileWriter* fw = new FileWriter(stdout, 1); -- cgit v1.3.1-10-gc9f91