diff options
author | Sadie Powell <sadie@witchery.services> | 2024-03-20 21:34:18 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2024-03-20 21:34:18 +0000 |
commit | 38cfb0603a79ca5545d8e9d2980cc6b3fef2d9e6 (patch) | |
tree | 9fbc1918fa7cad428320f276c6f376e49f3aacad | |
parent | 1a3844e74ebbb07920d494137ed2989172ae3dc5 (diff) |
Fix deleting pidfiles.
-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. */ |