From bfed2e1bf5cfb250e17e91566546b38b4b9a34d8 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 19 Mar 2024 15:39:41 +0000 Subject: Use paths relative to data/conf in the config file. This was done in some places already but not consistently. Closes #349. --- src/init.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/init.cpp') diff --git a/src/init.cpp b/src/init.cpp index 7cb136844..3881d92e8 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -218,7 +218,10 @@ static void remove_pidfile() static void write_pidfile() { - const auto pidfile = Config->GetBlock("serverinfo")->Get("pid"); + auto pidfile = Anope::ExpandData(Config->GetBlock("serverinfo")->Get("pid")); + if (pidfile.empty()) + return; + std::ofstream stream(pidfile.str()); if (!stream.is_open()) throw CoreException("Can not write to PID file " + pidfile); -- cgit