Skip to content

Commit d56c1e2

Browse files
checkmk.sh update (#7765)
1 parent 3dfbc2d commit d56c1e2

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

ct/checkmk.sh

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,21 @@ function update_script() {
2727
msg_error "No ${APP} Installation Found!"
2828
exit
2929
fi
30-
if check_for_gh_release "checkmk" "checkmk/checkmk"; then
31-
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)
32-
msg_info "Updating ${APP} to v${RELEASE}"
33-
$STD omd stop monitoring
34-
$STD omd cp monitoring monitoringbackup
35-
curl -fsSL "https://download.checkmk.com/checkmk/${RELEASE}/check-mk-raw-${RELEASE}_0.bookworm_amd64.deb" -o "/opt/checkmk.deb"
36-
$STD apt-get install -y /opt/checkmk.deb
37-
$STD omd --force -V ${RELEASE}.cre update --conflict=install monitoring
38-
$STD omd start monitoring
39-
$STD omd -f rm monitoringbackup
40-
$STD omd cleanup
41-
rm -rf /opt/checkmk.deb
42-
msg_ok "Updated ${APP}"
43-
msg_ok "Updated Successfully"
44-
fi
30+
31+
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)
32+
msg_info "Updating ${APP} to v${RELEASE}"
33+
$STD omd stop monitoring
34+
$STD omd cp monitoring monitoringbackup
35+
curl -fsSL "https://download.checkmk.com/checkmk/${RELEASE}/check-mk-raw-${RELEASE}_0.bookworm_amd64.deb" -o "/opt/checkmk.deb"
36+
$STD apt-get install -y /opt/checkmk.deb
37+
$STD omd --force -V ${RELEASE}.cre update --conflict=install monitoring
38+
$STD omd start monitoring
39+
$STD omd -f rm monitoringbackup
40+
$STD omd cleanup
41+
rm -rf /opt/checkmk.deb
42+
msg_ok "Updated ${APP}"
43+
msg_ok "Updated Successfully"
44+
4545
exit
4646
}
4747

0 commit comments

Comments
 (0)