etc/Makefile
etc/icinga2/Makefile
etc/icinga2/conf.d/Makefile
-etc/icinga2/mods-available/Makefile
+etc/icinga2/features-available/Makefile
etc/init.d/Makefile
icinga-app/Makefile
itl/Makefile
third-party/execvpe/Makefile
third-party/mmatch/Makefile
tools/Makefile
-tools/i2modconf
+tools/i2enfeature
tools/mkembedconfig/Makefile
])
AC_OUTPUT([
SUBDIRS = \
conf.d \
- mods-available
+ features-available
icinga2confdir = $(sysconfdir)/icinga2
install-exec-hook:
@cd $(icinga2confdir) && \
- if [ ! -e mods-enabled ]; then \
- $(MKDIR_P) mods-enabled && \
- $(LN_S) ../mods-available/compat.conf mods-enabled/; \
+ if [ ! -e features-enabled ]; then \
+ $(MKDIR_P) features-enabled && \
+ $(LN_S) ../features-available/compat.conf features-enabled/; \
fi
## Process this file with automake to produce Makefile.in
-icinga2confdir = $(sysconfdir)/icinga2/mods-available
-icinga2conf_DATA = \
- compat.load
+icinga2confdir = $(sysconfdir)/icinga2/features-available
CONFIG_FILES = \
compat.conf
fi; \
done
-EXTRA_DIST = $(CONFIG_FILES) $(icinga2conf_DATA)
+EXTRA_DIST = $(CONFIG_FILES)
* hosts and services. CompatLog writeis the Icinga 1.x icinga.log and archives.
*/
-include "compat.load"
+library "compat"
object StatusDataWriter "status" { }
object ExternalCommandListener "command" { }
+++ /dev/null
-library "compat"
-
SUBDIRS = \
mkembedconfig
-bin_SCRIPTS = i2modconf
+bin_SCRIPTS = i2enfeature
CLEANFILES = $(bin_SCRIPTS)
-EXTRA_DIST = i2modconf.in
+EXTRA_DIST = i2enfeature.in
install-exec-hook:
- $(LN_S) -f i2modconf $(bindir)/i2enmod
- $(LN_S) -f i2modconf $(bindir)/i2dismod
+ $(LN_S) -f i2enfeature $(bindir)/i2disfeature
--- /dev/null
+#!/bin/sh
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+sbindir=@sbindir@
+bindir=@bindir@
+sysconfdir=@sysconfdir@
+localstatedir=@localstatedir@
+
+ICINGA2CONFDIR=@sysconfdir@/icinga2
+
+TOOL=$(basename -- $0)
+
+if [ "$TOOL" != "i2enfeature" -a "$TOOL" != "i2disfeature" ]; then
+ echo "Invalid tool name ($TOOL). Should be 'i2enfeature' or 'i2disfeature'."
+ exit 1
+fi
+
+if [ -z "$1" ]; then
+ echo "Syntax: $0 <feature>"
+
+ if [ "$TOOL" = "i2enfeature" ]; then
+ echo "Enables the specified feature."
+ else
+ echo "Disables the specified feature."
+ fi
+
+ echo
+ echo -n "Available feature: "
+
+ for file in $ICINGA2CONFDIR/mods-available/*.conf; do
+ echo -n $(basename -- $file .conf)
+ done
+
+ echo
+
+ exit 1
+fi
+
+FEATURE=$1
+
+if [ ! -e $ICINGA2CONFDIR/mods-available/$FEATURE.conf ]; then
+ echo "The feature '$FEATURE' does not exist."
+ exit 1
+fi
+
+if [ "$TOOL" = "i2enfeature" ]; then
+ if [ -e $ICINGA2CONFDIR/mods-enabled/$FEATURE.conf ]; then
+ echo "The feature '$FEATURE' is already enabled."
+ exit 0
+ fi
+
+ ln -s ../mods-available/$FEATURE.conf $ICINGA2CONFDIR/mods-enabled/
+
+ echo "Module '$FEATURE' was enabled."
+elif [ "$TOOL" = "i2disfeature" ]; then
+ if [ ! -e $ICINGA2CONFDIR/mods-enabled/$FEATURE.conf ]; then
+ echo "The feature '$FEATURE' is already disabled."
+ exit 0
+ fi
+
+ rm -f $ICINGA2CONFDIR/mods-enabled/$FEATURE.conf
+
+ echo "Module '$FEATURE' was disabled."
+fi
+
+echo "Make sure to restart Icinga 2 for these changes to take effect."
+exit 0
+++ /dev/null
-#!/bin/sh
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-sbindir=@sbindir@
-bindir=@bindir@
-sysconfdir=@sysconfdir@
-localstatedir=@localstatedir@
-
-ICINGA2CONFDIR=@sysconfdir@/icinga2
-
-TOOL=$(basename -- $0)
-
-if [ "$TOOL" != "i2enmod" -a "$TOOL" != "i2dismod" ]; then
- echo "Invalid tool name ($TOOL). Should be 'i2enmod' or 'i2dismod'."
- exit 1
-fi
-
-if [ -z "$1" ]; then
- echo "Syntax: $0 <module>"
-
- if [ "$TOOL" = "i2enmod" ]; then
- echo "Enables the specified module."
- else
- echo "Disables the specified module."
- fi
-
- echo
- echo -n "Available modules: "
-
- for file in $ICINGA2CONFDIR/mods-available/*.conf; do
- echo -n $(basename -- $file .conf)
- done
-
- echo
-
- exit 1
-fi
-
-MOD=$1
-
-if [ ! -e $ICINGA2CONFDIR/mods-available/$MOD.conf ]; then
- echo "The module '$MOD' does not exist."
- exit 1
-fi
-
-if [ "$TOOL" = "i2enmod" ]; then
- if [ -e $ICINGA2CONFDIR/mods-enabled/$MOD.conf ]; then
- echo "The module '$MOD' is already enabled."
- exit 0
- fi
-
- ln -s ../mods-available/$MOD.conf $ICINGA2CONFDIR/mods-enabled/
-
- echo "Module '$MOD' was enabled."
-elif [ "$TOOL" = "i2dismod" ]; then
- if [ ! -e $ICINGA2CONFDIR/mods-enabled/$MOD.conf ]; then
- echo "The module '$MOD' is already disabled."
- exit 0
- fi
-
- rm -f $ICINGA2CONFDIR/mods-enabled/$MOD.conf
-
- echo "Module '$MOD' was disabled."
-fi
-
-echo "Make sure to restart Icinga 2 for these changes to take effect."
-exit 0