summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 5fed69345..283d7146e 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -217,6 +217,10 @@ int main(int ac, char **av, char **envp)
if (Anope::Restarting)
{
+ auto pidfile = Anope::ExpandData(Config->GetBlock("serverinfo").Get<const Anope::string>("pid"));
+ if (!pidfile.empty())
+ remove(pidfile.c_str());
+
if (chdir(BinaryDir.c_str()) == 0)
{
Anope::string sbin = "./" + Anope::ServicesBin;