Harmonize Service MSG-Blocks (#8233)

Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com>
This commit is contained in:
CanbiZ
2025-10-10 11:15:44 +02:00
committed by GitHub
co-authored by Slaviša Arežina
parent f39b17ad7a
commit 4b5fc75ee1
47 changed files with 173 additions and 172 deletions
+6 -6
View File
@@ -32,22 +32,22 @@ function update_script() {
DETAIL_PAGE=$(curl -fsSL "$BASE_URL#note_$RELEASE")
DOWNLOAD_URL=$(echo "$DETAIL_PAGE" | grep -oP "https://updates.networkoptix.com/default/$RELEASE/linux/nxwitness-server-[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+-linux_x64\.deb" | head -n 1)
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
msg_info "Stopping ${APP}"
msg_info "Stopping Service"
systemctl stop networkoptix-root-tool networkoptix-mediaserver
msg_ok "${APP} Stopped"
msg_ok "Stopped Service"
msg_info "Updating ${APP} to ${RELEASE}"
cd /tmp
curl -fsSL "$DOWNLOAD_URL" -o ""nxwitness-server-$RELEASE-linux_x64.deb""
curl -fsSL "$DOWNLOAD_URL" -o ""nxwitness-server-$RELEASE-linux_x64.deb""
export DEBIAN_FRONTEND=noninteractive
export DEBCONF_NOWARNINGS=yes
$STD dpkg -i nxwitness-server-$RELEASE-linux_x64.deb
echo "${RELEASE}" >/opt/${APP}_version.txt
msg_ok "Updated ${APP}"
msg_info "Starting ${APP}"
msg_info "Starting Service"
systemctl start networkoptix-root-tool networkoptix-mediaserver
msg_ok "Started ${APP}"
msg_ok "Started Service"
msg_info "Cleaning up"
rm -f /tmp/nxwitness-server-$RELEASE-linux_x64.deb
@@ -67,4 +67,4 @@ description
msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:7001/${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:7001/${CL}"