1
0
mirror of https://github.com/anope/anope.git synced 2026-06-26 17:36:38 +02:00

Use paths relative to data/conf in the config file.

This was done in some places already but not consistently.

Closes #349.
This commit is contained in:
Sadie Powell
2024-03-19 15:39:41 +00:00
parent e488f294a1
commit bfed2e1bf5
8 changed files with 32 additions and 23 deletions
+4 -1
View File
@@ -218,7 +218,10 @@ static void remove_pidfile()
static void write_pidfile()
{
const auto pidfile = Config->GetBlock("serverinfo")->Get<const Anope::string>("pid");
auto pidfile = Anope::ExpandData(Config->GetBlock("serverinfo")->Get<const Anope::string>("pid"));
if (pidfile.empty())
return;
std::ofstream stream(pidfile.str());
if (!stream.is_open())
throw CoreException("Can not write to PID file " + pidfile);