diff options
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/init.cpp b/src/init.cpp index 3881d92e8..8bf7d387c 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -211,7 +211,9 @@ static void InitSignals() static void remove_pidfile() { - remove(Config->GetBlock("serverinfo")->Get<const Anope::string>("pid").c_str()); + auto pidfile = Anope::ExpandData(Config->GetBlock("serverinfo")->Get<const Anope::string>("pid")); + if (!pidfile.empty()) + remove(pidfile.c_str()); } /* Create our PID file and write the PID to it. */ |