diff --git a/ct/checkmk.sh b/ct/checkmk.sh index 7822d135..f1f930b8 100644 --- a/ct/checkmk.sh +++ b/ct/checkmk.sh @@ -29,7 +29,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi - RELEASE=$(curl -fsSL https://api.github.com/repos/checkmk/checkmk/tags | grep "name" | awk '{print substr($2, 3, length($2)-4) }' | grep -v "*-rc" | tail -n +2 | head -n 1) + RELEASE=$(curl -fsSL https://api.github.com/repos/checkmk/checkmk/tags | grep "name" | awk '{print substr($2, 3, length($2)-4) }') if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then msg_info "Updating ${APP} to v${RELEASE}" omd stop monitoring &>/dev/null diff --git a/install/checkmk-install.sh b/install/checkmk-install.sh index 892c057d..e94f90c5 100644 --- a/install/checkmk-install.sh +++ b/install/checkmk-install.sh @@ -22,7 +22,7 @@ $STD apt-get install -y \ msg_ok "Installed Dependencies" msg_info "Install Checkmk" -RELEASE=$(curl -fsSL https://api.github.com/repos/checkmk/checkmk/tags | grep "name" | awk '{print substr($2, 3, length($2)-4) }' | grep -v "*-rc" | tail -n +2 | head -n 1) +RELEASE=$(curl -fsSL https://api.github.com/repos/checkmk/checkmk/tags | grep "name" | awk '{print substr($2, 3, length($2)-4) }') wget -q 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 echo "${RELEASE}" >"/opt/checkmk_version.txt"