Skip to content

Commit a5a1431

Browse files
michelroegl-brunnerRögl-Brunner Michel
andauthored
Update Checkmk version grepping (#2264)
Co-authored-by: Rögl-Brunner Michel <[email protected]>
1 parent 9338fde commit a5a1431

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ct/checkmk.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function update_script() {
2929
msg_error "No ${APP} Installation Found!"
3030
exit
3131
fi
32-
RELEASE=$(curl -fsSL https://api.github.com/repos/checkmk/checkmk/tags | grep "name" | awk '{print substr($2, 3, length($2)-4) }')
32+
RELEASE=$(curl -fsSL https://api.github.com/repos/checkmk/checkmk/tags | grep "name" | awk '{print substr($2, 3, length($2)-4) }' | tr ' ' '\n' | grep -v '\-rc' | sort -V | tail -n 1)
3333
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
3434
msg_info "Updating ${APP} to v${RELEASE}"
3535
omd stop monitoring &>/dev/null

install/checkmk-install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ $STD apt-get install -y \
2222
msg_ok "Installed Dependencies"
2323

2424
msg_info "Install Checkmk"
25-
RELEASE=$(curl -fsSL https://api.github.com/repos/checkmk/checkmk/tags | grep "name" | awk '{print substr($2, 3, length($2)-4) }' | head -n 1)
25+
RELEASE=$(curl -fsSL https://api.github.com/repos/checkmk/checkmk/tags | grep "name" | awk '{print substr($2, 3, length($2)-4) }' | tr ' ' '\n' | grep -v '\-rc' | sort -V | tail -n 1)
2626
wget -q https://download.checkmk.com/checkmk/${RELEASE}/check-mk-raw-${RELEASE}_0.bookworm_amd64.deb -O /opt/checkmk.deb
2727
$STD apt-get install -y /opt/checkmk.deb
2828
echo "${RELEASE}" >"/opt/checkmk_version.txt"

0 commit comments

Comments
 (0)