1
0
mirror of https://github.com/anope/anope.git synced 2026-06-12 19:14:47 +02:00

Remove the pidfile before restarting.

Fixes being unable to restart now we only allow one instance.
This commit is contained in:
Sadie Powell
2025-05-17 20:04:21 +01:00
parent d3bb930a5e
commit cb334fbae1
+4
View File
@@ -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;