From b6eb13621d558f7ce9bc1856b2981011db708f2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gardais=20J=C3=A9r=C3=A9my?= Date: Wed, 13 Jan 2021 11:21:23 +0100 Subject: [PATCH] Rename get_maco_status to get_maco_update --- xymon/plugins/client/ext/maco.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/xymon/plugins/client/ext/maco.sh b/xymon/plugins/client/ext/maco.sh index 7aff379..319b43a 100755 --- a/xymon/plugins/client/ext/maco.sh +++ b/xymon/plugins/client/ext/maco.sh @@ -102,16 +102,16 @@ ${_file_empty} file is not empty." } # }}} -# Get Maco status {{{ -get_maco_status() { +# Get Maco update state {{{ +get_maco_update() { - maco_status_script_path="/opt/repos/ipr.scripts/cluster/maco.check.update.sh" - maco_status_script_options="--simulate" + maco_update_script_path="/opt/repos/ipr.scripts/cluster/maco.check.update.sh" + maco_update_script_options="--simulate" - ## Run status_script and store result in PLUGIN_RESULT file - debug_message "get_maco_status − \ -Run \"${maco_status_script_path}\" script with \"${maco_status_script_options}\" options." - sh "${maco_status_script_path}" "${maco_status_script_options}" >> "${PLUGIN_RESULT}" + ## Run update_script and store result in PLUGIN_RESULT file + debug_message "get_maco_update − \ +Run \"${maco_update_script_path}\" script with \"${maco_update_script_options}\" options." + sh "${maco_update_script_path}" "${maco_update_script_options}" >> "${PLUGIN_RESULT}" } # }}} @@ -119,7 +119,7 @@ Run \"${maco_status_script_path}\" script with \"${maco_status_script_options}\" analyze_maco_status() { debug_message "analyze_maco_status − \ -Try to detect Maco status with ${PLUGIN_RESULT} content." +Try to detect Maco update with ${PLUGIN_RESULT} content." if grep -qE '^Local.* up to date.*' "${PLUGIN_RESULT}" then @@ -131,7 +131,7 @@ Try to detect Maco status with ${PLUGIN_RESULT} content." then echo "1&red Maco needs urgent upgrade" >> "${PLUGIN_STATE}" else - echo "4&clear Maco status is unknown" >> "${PLUGIN_STATE}" + echo "4&clear Maco update state is unknown" >> "${PLUGIN_STATE}" fi } @@ -167,9 +167,9 @@ main() { # {{{ regenerate_if_too_old "${PLUGIN_STATE}" # If previous result is empty - ## Re-check Maco status + ## Re-check Maco update is_file_empty "${PLUGIN_RESULT}" \ - && get_maco_status + && get_maco_update # If previous state is empty ## analyze Maco's result