diff --git a/ct/checkmk.sh b/ct/checkmk.sh index 40ff1c937..a9fe1b431 100644 --- a/ct/checkmk.sh +++ b/ct/checkmk.sh @@ -27,21 +27,21 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi - if check_for_gh_release "checkmk" "checkmk/checkmk"; then - RELEASE=$(curl -fsSL https://api.github.com/repos/checkmk/checkmk/tags | grep "name" | awk '{print substr($2, 3, length($2)-4) }' | tr ' ' '\n' | grep -Ev 'rc|b' | sort -V | tail -n 1) - msg_info "Updating ${APP} to v${RELEASE}" - $STD omd stop monitoring - $STD omd cp monitoring monitoringbackup - curl -fsSL "https://download.checkmk.com/checkmk/${RELEASE}/check-mk-raw-${RELEASE}_0.bookworm_amd64.deb" -o "/opt/checkmk.deb" - $STD apt-get install -y /opt/checkmk.deb - $STD omd --force -V ${RELEASE}.cre update --conflict=install monitoring - $STD omd start monitoring - $STD omd -f rm monitoringbackup - $STD omd cleanup - rm -rf /opt/checkmk.deb - msg_ok "Updated ${APP}" - msg_ok "Updated Successfully" - fi + + RELEASE=$(curl -fsSL https://api.github.com/repos/checkmk/checkmk/tags | grep "name" | awk '{print substr($2, 3, length($2)-4) }' | tr ' ' '\n' | grep -Ev 'rc|b' | sort -V | tail -n 1) + msg_info "Updating ${APP} to v${RELEASE}" + $STD omd stop monitoring + $STD omd cp monitoring monitoringbackup + curl -fsSL "https://download.checkmk.com/checkmk/${RELEASE}/check-mk-raw-${RELEASE}_0.bookworm_amd64.deb" -o "/opt/checkmk.deb" + $STD apt-get install -y /opt/checkmk.deb + $STD omd --force -V ${RELEASE}.cre update --conflict=install monitoring + $STD omd start monitoring + $STD omd -f rm monitoringbackup + $STD omd cleanup + rm -rf /opt/checkmk.deb + msg_ok "Updated ${APP}" + msg_ok "Updated Successfully" + exit }