From a63a1002a820d203247701ea3202074fd0ac3f6b Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Tue, 22 Jan 2013 16:23:25 +0100 Subject: [PATCH] Implemented external command "SHUTDOWN_PROGRAM". --- lib/icinga/externalcommand.cpp | 7 +++++++ lib/icinga/externalcommand.h | 1 + 2 files changed, 8 insertions(+) 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; -- 2.40.0