fix(twingate-connector): perform real apt upgrade during update flow

The update path used ensure_dependencies, which only installs missing
packages and does not upgrade already installed ones. As a result, users
could see 'Updated successfully' even when a newer twingate-connector
version was available.

Switch update_script to a real package update flow:
- ensure apt is healthy
- refresh apt metadata
- install/upgrade twingate-connector via retry helper
- restart service

This aligns behavior with Twingate's documented upgrade process.
This commit is contained in:
CanbiZ (MickLesk)
2026-04-23 13:39:36 +02:00
parent aa54abcf50
commit b909d53efb

View File

@@ -30,7 +30,12 @@ function update_script() {
fi
msg_info "Updating ${APP}"
ensure_dependencies twingate-connector
ensure_apt_working || return 100
$STD apt update || msg_warn "apt update failed, continuing with cached package lists"
install_packages_with_retry twingate-connector || {
msg_error "Failed to update ${APP} package"
return 100
}
$STD systemctl restart twingate-connector
msg_ok "Updated successfully!"
exit