From 4f1ee5a982f7e9beb38eab9b6e3ec684d2d14eeb Mon Sep 17 00:00:00 2001 From: Tristan PILAT Date: Fri, 22 Mar 2019 17:24:45 +0100 Subject: [PATCH] Update the IS_NRPE check --- evocheck.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/evocheck.sh b/evocheck.sh index 1c37fa9..12704c0 100755 --- a/evocheck.sh +++ b/evocheck.sh @@ -307,9 +307,6 @@ if [ "$IS_POSTGRESQL" = 1 ]; then fi if [ "$IS_NRPE" = 1 ]; then - ( pkg info | grep -qE "nagios-plugins-[0-9.]" \ - && pkg info | grep -q nagios-plugins-ntp \ - && pkg info | grep -q nrpe ) || echo 'IS_NRPE FAILED!' fi if [ "$IS_NRPEDAEMON" = 1 ]; then @@ -318,6 +315,10 @@ fi if [ "$IS_ALERTBOOT" = 1 ]; then grep -qE "^date \| mail -sboot/reboot .*evolix.fr$" /etc/rc.local || echo 'IS_ALERTBOOT FAILED!' + ( pkg_info | grep -q monitoring-plugins && pkg_info | grep -q nrpe ) || echo 'IS_NRPE FAILED!' + if [[ "$VERBOSE" == 1 ]]; then + echo "nrpe and/or monitoring-plugins are not installed! Please add with pkg_add nrpe monitoring-plugins" + fi fi if [ "$IS_RSYNC" = 1 ]; then