diff --git a/libinstall/CentWeb.sh b/libinstall/CentWeb.sh index b93808a1657507de3619f9f302d8ccb0e9b93288..ee689acd02df81732cda42cd7c6b1617842dcd72 100755 --- a/libinstall/CentWeb.sh +++ b/libinstall/CentWeb.sh @@ -165,6 +165,7 @@ ${SED} -e 's|@NAGIOS_VAR@|'"$NAGIOS_VAR"'|g' \ -e 's|@CENTREON_ETC@|'"$CENTREON_ETC"'|g' \ -e 's|@CENTREON_LOG@|'"$CENTREON_LOG"'|g' \ -e 's|@CENTREON_VARLIB@|'"$CENTREON_VARLIB"'|g' \ + -e 's|@CENTREON_ENGINE_CONNECTORS@|'"$CENTREON_ENGINE_CONNECTORS"'|g' \ $TMP_DIR/src/www/install/insertBaseConf.sql > \ $TMP_DIR/work/www/install/insertBaseConf.sql check_result $? "$(gettext "Change macros for insertBaseConf.sql")" diff --git a/libinstall/functions b/libinstall/functions index b8bdcf671173dbb413ce2480aaab77bf6db55dc2..5cd59df08c6e0113f64319f6182914774025a367 100755 --- a/libinstall/functions +++ b/libinstall/functions @@ -508,6 +508,22 @@ function locate_nagios_plugindir() { log "INFO" "NAGIOS_PLUGIN: $NAGIOS_PLUGIN" } +#---- +## Define where is centreon connector directory +## in last version of this script, you have been a possibility to create if not exist. now is not possible. You will create manualy. +## @Globals CENTREON_ENGINE_CONNECTORS, DEFAULT_CENTREON_ENGINE_CONNECTORS +#---- +function locate_centreon_connector_dir() { + testdir_clean "$CENTREON_ENGINE_CONNECTORS" "CENTREON_ENGINE_CONNECTORS" + if [ -z "$CENTREON_ENGINE_CONNECTORS" ] ; then + answer_with_testoptionaldir "$(gettext "Where is your Centreon Connectors directory ?")" "$DEFAULT_CENTREON_ENGINE_CONNECTORS" + echo_success "$(gettext "Path ) $CENTREON_ENGINE_CONNECTORS" "$ok" + fi + CENTREON_ENGINE_CONNECTORS=`trim ${CENTREON_ENGINE_CONNECTORS%}` + export CENTREON_ENGINE_CONNECTORS + log "INFO" "CENTREON_ENGINE_CONNECTORS: $CENTREON_ENGINE_CONNECTORS" +} + #---- ## Define where is your nagios binary ## By default, use nagios,nagios2 or nagios3 name and find in PATH diff --git a/tmpl/vardistrib/cengine.tmpl b/tmpl/vardistrib/cengine.tmpl index 563c9e6659a2699ee466ade5dec4602523f6cd10..1a112bf2ee3faffeb865e588e1cc9348192af00f 100644 --- a/tmpl/vardistrib/cengine.tmpl +++ b/tmpl/vardistrib/cengine.tmpl @@ -40,6 +40,8 @@ NDOMOD_BINARY="/usr/local/centreon-broker/bin/cbd" NDO2DB_BINARY="/usr/local/centreon-broker/bin/cbd" ## Nagios init script (optional) NAGIOS_INIT_SCRIPT="/etc/init.d/centengine.sh" +## Centreon Connector PATH +CENTREON_ENGINE_CONNECTORS="/usr/lib/centreon-connector" ##################################################################### ## End: Nagios preferences ##################################################################### \ No newline at end of file diff --git a/tmpl/vardistrib/centos b/tmpl/vardistrib/centos index 901e6e8109e0d39d0ac816b9c88a7782293cae3c..9f9c38b911a72e01fa2804ff82f688335070ad6c 100644 --- a/tmpl/vardistrib/centos +++ b/tmpl/vardistrib/centos @@ -111,6 +111,8 @@ NAGIOS_VAR="/var/log/nagios/" NAGIOS_USER="nagios" ## Nagios group (optional) NAGIOS_GROUP="nagios" +## Centreon Connector PATH +CENTREON_ENGINE_CONNECTORS="/usr/lib/centreon-connector" ##################################################################### ## End: Nagios preferences ##################################################################### diff --git a/tmpl/vardistrib/debian-etch b/tmpl/vardistrib/debian-etch index d62918055e30172bb484867e7e1d31b20706a299..a9db51b874f53259a4246834140f410484836177 100755 --- a/tmpl/vardistrib/debian-etch +++ b/tmpl/vardistrib/debian-etch @@ -122,6 +122,8 @@ NAGIOS_P1_FILE="/usr/lib/nagios2/p1.pl" #NDOMOD_BINARY= ## Nagios init script (optional) NAGIOS_INIT_SCRIPT="/etc/init.d/nagios2" +## Centreon Connector PATH +CENTREON_ENGINE_CONNECTORS="/usr/lib/centreon-connector" ##################################################################### ## End: Nagios preferences ##################################################################### diff --git a/tmpl/vardistrib/debian-lenny b/tmpl/vardistrib/debian-lenny index 12e2d62b4e026097f4f4d3d381dbe7c8613d8612..c2d942bbe964d4e6d393e6c074e3c347d27184e5 100755 --- a/tmpl/vardistrib/debian-lenny +++ b/tmpl/vardistrib/debian-lenny @@ -122,6 +122,8 @@ NAGIOS_P1_FILE="/usr/lib/nagios3/p1.pl" #NDOMOD_BINARY= ## Nagios init script (optional) NAGIOS_INIT_SCRIPT="/etc/init.d/nagios3" +## Centreon Connector PATH +CENTREON_ENGINE_CONNECTORS="/usr/lib/centreon-connector" ##################################################################### ## End: Nagios preferences ##################################################################### diff --git a/tmpl/vardistrib/fedora-core b/tmpl/vardistrib/fedora-core index c48f6d61a1976da697937ff0a74e3f776bf52e9d..ee0130134de8afd67e47f4130f790fdeb2770c48 100755 --- a/tmpl/vardistrib/fedora-core +++ b/tmpl/vardistrib/fedora-core @@ -111,6 +111,8 @@ NAGIOS_VAR="/var/log/nagios/" NAGIOS_USER="nagios" ## Nagios group (optional) NAGIOS_GROUP="nagios" +## Centreon Connector PATH +CENTREON_ENGINE_CONNECTORS="/usr/lib/centreon-connector" ##################################################################### ## End: Nagios preferences ##################################################################### diff --git a/tmpl/vardistrib/opensuse b/tmpl/vardistrib/opensuse index caafb97d8ae4b69e1461208c381b976395befb50..532c10d56ed69396ddf9eae80ea66109b64fe217 100755 --- a/tmpl/vardistrib/opensuse +++ b/tmpl/vardistrib/opensuse @@ -101,6 +101,8 @@ NAGIOS_VAR="" #NAGIOS_USER="" ## Nagios group (optional) #NAGIOS_GROUP="" +## Centreon Connector PATH +#CENTREON_ENGINE_CONNECTORS="" ##################################################################### ## End: Nagios preferences ##################################################################### diff --git a/tmpl/vardistrib/redhat-4 b/tmpl/vardistrib/redhat-4 index 8060175d9e769059dec4893f880685bb07609776..330c01622dd37f727f97b1acf0640863ff0f7eeb 100755 --- a/tmpl/vardistrib/redhat-4 +++ b/tmpl/vardistrib/redhat-4 @@ -111,6 +111,8 @@ NAGIOS_VAR="/opt/nagios/var" #NDOMOD_BINARY= ## Nagios init script (optional) #NAGIOS_INIT_SCRIPT="/etc/init.d/nagios" +## Centreon Connector PATH +#CENTREON_ENGINE_CONNECTORS="/usr/lib/centreon-connector" ##################################################################### ## End: Nagios preferences ##################################################################### diff --git a/tmpl/vardistrib/sample.tmpl b/tmpl/vardistrib/sample.tmpl index b2d61392c93bd1a7ed82d6363d5a626268a500b7..d07aba983f43c59e5f1a4f0439232c4c64cdf746 100755 --- a/tmpl/vardistrib/sample.tmpl +++ b/tmpl/vardistrib/sample.tmpl @@ -127,6 +127,8 @@ NAGIOS_VAR="/var/log/nagios" #NDOMOD_BINARY= ## Nagios init script (optional) #NAGIOS_INIT_SCRIPT="/etc/init.d/nagios" +## Centreon Connector PATH +#CENTREON_ENGINE_CONNECTORS="/usr/lib/centreon-connector" ##################################################################### ## End: Nagios preferences ##################################################################### diff --git a/tmpl/vardistrib/sles11 b/tmpl/vardistrib/sles11 index 32a1e11b6220f1ef9d5e56833e221817cc06c102..3182d37dead8c61a2f2475ac9aba546729a9e446 100755 --- a/tmpl/vardistrib/sles11 +++ b/tmpl/vardistrib/sles11 @@ -123,6 +123,8 @@ NAGIOS_P1_FILE="/usr/lib/nagios/p1.pl" #NDOMOD_BINARY="" ## Nagios init script (optional) NAGIOS_INIT_SCRIPT="/etc/init.d/nagios" +## Centreon Connector PATH +CENTREON_ENGINE_CONNECTORS="/usr/lib/centreon-connector" ##################################################################### ## End: Nagios preferences ##################################################################### diff --git a/tmpl/vardistrib/ubuntu-hardy b/tmpl/vardistrib/ubuntu-hardy index 559028b9660dc357e513d119be647b98e5a3fb8b..49ab84320fface737158f5aab029f6f3b6cb4c02 100755 --- a/tmpl/vardistrib/ubuntu-hardy +++ b/tmpl/vardistrib/ubuntu-hardy @@ -122,6 +122,8 @@ NAGIOS_P1_FILE="/usr/lib/nagios2/p1.pl" #NDOMOD_BINARY= ## Nagios init script (optional) NAGIOS_INIT_SCRIPT="/etc/init.d/nagios2" +## Centreon Connector PATH +CENTREON_ENGINE_CONNECTORS="/usr/lib/centreon-connector" ##################################################################### ## End: Nagios preferences ##################################################################### diff --git a/varinstall/vars b/varinstall/vars index 1112114cbce03480bc5fc6f021bead90c9dfd9af..bb087ea562200446eda9a11cd7f35f5aef1edf5e 100644 --- a/varinstall/vars +++ b/varinstall/vars @@ -48,3 +48,4 @@ DEFAULT_CENTCORE_BINDIR="bin" DEFAULT_SNMP_ETC="/etc/snmp" DEFAULT_SNMPTT_BINDIR="/usr/local/centreon/bin/" DEFAULT_CENTPLUGINSTRAPS_BINDIR="/usr/local/centreon/bin" +DEFAULT_NAGIOS_PLUGIN="/usr/lib/centreon-connector" \ No newline at end of file