Make sure that libmethods is automatically loaded even when not using the ITL

fixes #12578
This commit is contained in:
Gunnar Beutner 2016-08-28 17:03:08 +02:00
parent 20174a0baa
commit 903db81fe0
6 changed files with 4 additions and 29 deletions

View File

@ -16,11 +16,6 @@ These templates are imported by the provided example configuration.
> These templates are built into the binaries. By convention
> all command and timeperiod objects should import these templates.
If you're not using the ITL includes you can manually load the
library which contains these templates:
library "methods"
### <a id="itl-plugin-check-command"></a> plugin-check-command
Command template for check plugins executed by Icinga 2.

View File

@ -18,6 +18,6 @@
add_subdirectory(plugins-contrib.d)
install(
FILES itl command.conf command-icinga.conf hangman plugins command-plugins.conf manubulon command-plugins-manubulon.conf windows-plugins command-plugins-windows.conf nscp command-nscp-local.conf plugins-contrib
FILES itl command-icinga.conf hangman plugins command-plugins.conf manubulon command-plugins-manubulon.conf windows-plugins command-plugins-windows.conf nscp command-nscp-local.conf plugins-contrib
DESTINATION ${CMAKE_INSTALL_DATADIR}/icinga2/include
)

View File

@ -1,20 +0,0 @@
/******************************************************************************
* Icinga 2 *
* Copyright (C) 2012-2016 Icinga Development Team (https://www.icinga.org/) *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software Foundation *
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/
library "methods"

View File

@ -22,5 +22,4 @@
* configuration templates.
*/
include "command.conf"
include "command-icinga.conf"

View File

@ -33,6 +33,7 @@
#include "base/scriptglobal.hpp"
#include "base/initialize.hpp"
#include "base/statsfunction.hpp"
#include "base/loader.hpp"
using namespace icinga;
@ -43,6 +44,8 @@ INITIALIZE_ONCE(&IcingaApplication::StaticInitialize);
void IcingaApplication::StaticInitialize(void)
{
Loader::LoadExtensionLibrary("methods");
String node_name = Utility::GetFQDN();
if (node_name.IsEmpty()) {

View File

@ -52,8 +52,6 @@ struct LivestatusFixture
static void CreateTestObjects(void)
{
String config = R"CONFIG(
library "methods"
object CheckCommand "dummy" {
command = "/bin/echo"
}