mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-05-05 16:35:59 +00:00
b909d53efb
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.
49 lines
1.3 KiB
Bash
49 lines
1.3 KiB
Bash
#!/usr/bin/env bash
|
|
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
|
# Copyright (c) 2021-2026 community-scripts ORG
|
|
# Author: twingate-andrewb
|
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
# Source: https://www.twingate.com/docs/
|
|
|
|
APP="Twingate-Connector"
|
|
var_tags="${var_tags:-network;connector;twingate}"
|
|
var_cpu="${var_cpu:-1}"
|
|
var_ram="${var_ram:-1024}"
|
|
var_disk="${var_disk:-3}"
|
|
var_os="${var_os:-ubuntu}"
|
|
var_version="${var_version:-24.04}"
|
|
var_unprivileged="${var_unprivileged:-1}"
|
|
|
|
header_info "$APP"
|
|
variables
|
|
color
|
|
catch_errors
|
|
|
|
function update_script() {
|
|
header_info
|
|
check_container_storage
|
|
check_container_resources
|
|
|
|
if [[ ! -f /lib/systemd/system/twingate-connector.service ]]; then
|
|
msg_error "No ${APP} Installation Found!"
|
|
exit
|
|
fi
|
|
|
|
msg_info "Updating ${APP}"
|
|
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
|
|
}
|
|
|
|
start
|
|
build_container
|
|
description
|
|
|
|
msg_ok "All Finished! If you need to update your access or refresh tokens, they can be found in /etc/twingate/connector.conf"
|