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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user