diff --git a/lib/icinga/externalcommand.cpp b/lib/icinga/externalcommand.cpp index fc583aebb..56d3d232d 100644 --- a/lib/icinga/externalcommand.cpp +++ b/lib/icinga/externalcommand.cpp @@ -33,6 +33,7 @@ void ExternalCommand::Execute(double time, const String& command, const vector& argumen service->SetEnableChecks(false); } +void ExternalCommand::ShutdownProcess(double time, const vector& arguments) +{ + Logger::Write(LogInformation, "icinga", "Shutting down Icinga via external command."); + Application::RequestShutdown(); +} + diff --git a/lib/icinga/externalcommand.h b/lib/icinga/externalcommand.h index dea2f72c4..4881ed143 100644 --- a/lib/icinga/externalcommand.h +++ b/lib/icinga/externalcommand.h @@ -34,6 +34,7 @@ public: static void ScheduleForcedSvcCheck(double time, const vector& arguments); static void EnableSvcCheck(double time, const vector& arguments); static void DisableSvcCheck(double time, const vector& arguments); + static void ShutdownProcess(double time, const vector& arguments); private: typedef function& arguments)> Callback;