Fix shutdown API call

This commit is contained in:
Thulinma 2020-08-31 15:27:59 +02:00
parent 3fbc50c2ba
commit ef1ee853b9

View file

@ -667,6 +667,7 @@ void Controller::handleAPICommands(JSON::Value & Request, JSON::Value & Response
}
WARN_MSG("Shutdown requested through local API: %s", reason.c_str());
Controller::conf.is_active = false;
kill(getpid(), SIGINT);
Response["shutdown"] = "Shutting down";
}else{
Response["shutdown"] = "Ignored - only local users may request shutdown";