Standardize update success messages in scripts (#8757)

This commit is contained in:
CanbiZ
2025-10-30 09:24:16 -07:00
committed by GitHub
parent e900367b51
commit be7d0704d7
357 changed files with 1296 additions and 1217 deletions

View File

@@ -32,13 +32,13 @@ function update_script() {
RELEASE=$(curl -fsSL https://api.github.com/repos/rustdesk/rustdesk-server/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
APIRELEASE=$(curl -fsSL https://api.github.com/repos/lejianwen/rustdesk-api/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
if [[ "${RELEASE}" != "$(cat ~/.rustdesk-hbbr)" ]] || [[ "${APIRELEASE}" != "$(cat ~/.rustdesk-api)" ]] || [[ ! -f ~/.rustdesk-hbbr ]] || [[ ! -f ~/.rustdesk-api ]]; then
msg_info "Stopping $APP"
msg_info "Stopping Service"
systemctl stop rustdesk-hbbr
systemctl stop rustdesk-hbbs
if [[ -f /lib/systemd/system/rustdesk-api.service ]]; then
systemctl stop rustdesk-api
fi
msg_ok "Stopped $APP"
msg_info "Stopped Service"
fetch_and_deploy_gh_release "rustdesk-hbbr" "rustdesk/rustdesk-server" "binary" "latest" "/opt/rustdesk" "rustdesk-server-hbbr*amd64.deb"
fetch_and_deploy_gh_release "rustdesk-hbbs" "rustdesk/rustdesk-server" "binary" "latest" "/opt/rustdesk" "rustdesk-server-hbbs*amd64.deb"
@@ -49,7 +49,7 @@ function update_script() {
systemctl start -q rustdesk-* --all
msg_ok "Services started"
msg_ok "Update Successful"
msg_ok "Updated successfully!"
else
msg_ok "No update required. ${APP} is already at v${RELEASE}"
fi