mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-11-20 20:45:15 +00:00
Compare commits
8 Commits
update_ver
...
CrazyWolf1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
51679c7921 | ||
|
|
5df2768767 | ||
|
|
ca07e79270 | ||
|
|
6013871809 | ||
|
|
4b6106c2fb | ||
|
|
3b55746ed9 | ||
|
|
316cdf02ff | ||
|
|
4efb672251 |
47
ct/kasm.sh
47
ct/kasm.sh
@@ -25,14 +25,51 @@ function update_script() {
|
|||||||
header_info
|
header_info
|
||||||
check_container_storage
|
check_container_storage
|
||||||
check_container_resources
|
check_container_resources
|
||||||
if [[ ! -d /var ]]; then
|
if [[ ! -d /opt/kasm/current ]]; then
|
||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
msg_info "Updating LXC"
|
|
||||||
$STD apt update
|
msg_info "Checking for new version"
|
||||||
$STD apt -y upgrade
|
CURRENT_VERSION=$(readlink -f /opt/kasm/current | awk -F'/' '{print $4}')
|
||||||
msg_ok "Updated LXC"
|
KASM_URL=$(curl -fsSL "https://www.kasm.com/downloads" | tr '\n' ' ' | grep -oE 'https://kasm-static-content[^"]*kasm_release_[0-9]+\.[0-9]+\.[0-9]+\.[a-z0-9]+\.tar\.gz' | head -n 1)
|
||||||
|
if [[ -z "$KASM_URL" ]]; then
|
||||||
|
msg_error "Unable to detect latest Kasm release URL."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
KASM_VERSION=$(echo "$KASM_URL" | sed -E 's/.*kasm_release_([0-9]+\.[0-9]+\.[0-9]+).*/\1/')
|
||||||
|
msg_info "Checked for new version"
|
||||||
|
|
||||||
|
msg_info "Removing outdated docker-compose plugin"
|
||||||
|
[ -f ~/.docker/cli-plugins/docker-compose ] && rm -rf ~/.docker/cli-plugins/docker-compose
|
||||||
|
msg_ok "Removed outdated docker-compose plugin"
|
||||||
|
|
||||||
|
if [[ -z "$CURRENT_VERSION" ]] || [[ "$KASM_VERSION" != "$CURRENT_VERSION" ]]; then
|
||||||
|
msg_info "Updating Kasm"
|
||||||
|
cd /tmp
|
||||||
|
|
||||||
|
msg_warn "WARNING: This script will run an external installer from a third-party source (https://www.kasmweb.com/)."
|
||||||
|
msg_warn "The following code is NOT maintained or audited by our repository."
|
||||||
|
msg_warn "If you have any doubts or concerns, please review the installer code before proceeding:"
|
||||||
|
msg_custom "${TAB3}${GATEWAY}${BGN}${CL}" "\e[1;34m" "→ upgrade.sh inside tar.gz $KASM_URL"
|
||||||
|
echo
|
||||||
|
read -r -p "${TAB3}Do you want to continue? [y/N]: " CONFIRM
|
||||||
|
if [[ ! "$CONFIRM" =~ ^([yY][eE][sS]|[yY])$ ]]; then
|
||||||
|
msg_error "Aborted by user. No changes have been made."
|
||||||
|
exit 10
|
||||||
|
fi
|
||||||
|
curl -fsSL -o "/tmp/kasm_release_${KASM_VERSION}.tar.gz" "$KASM_URL"
|
||||||
|
tar -xf "kasm_release_${KASM_VERSION}.tar.gz"
|
||||||
|
chmod +x /tmp/kasm_release/install.sh
|
||||||
|
rm -f /tmp/kasm_release_${KASM_VERSION}.tar.gz
|
||||||
|
|
||||||
|
bash /tmp/kasm_release/upgrade.sh --proxy-port 443
|
||||||
|
rm -rf /tmp/kasm_release
|
||||||
|
msg_ok "Updated Successfully"
|
||||||
|
else
|
||||||
|
msg_ok "No update required. Kasm is already at v${KASM_VERSION}"
|
||||||
|
|
||||||
|
fi
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
],
|
],
|
||||||
"date_created": "2025-05-26",
|
"date_created": "2025-05-26",
|
||||||
"type": "ct",
|
"type": "ct",
|
||||||
"updateable": false,
|
"updateable": true,
|
||||||
"privileged": true,
|
"privileged": true,
|
||||||
"config_path": "",
|
"config_path": "",
|
||||||
"interface_port": 443,
|
"interface_port": 443,
|
||||||
|
|||||||
@@ -13,19 +13,16 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Detecting latest Kasm Workspaces release"
|
msg_info "Installing Docker"
|
||||||
KASM_URL=$(
|
$STD sh <(curl -fsSL https://get.docker.com/)
|
||||||
curl -fsSL "https://www.kasm.com/downloads" \
|
msg_ok "Installed Docker"
|
||||||
| tr '\n' ' ' \
|
|
||||||
| grep -oE 'https://kasm-static-content[^"]*kasm_release_[0-9]+\.[0-9]+\.[0-9]+\.[a-z0-9]+\.tar\.gz' \
|
|
||||||
| head -n 1
|
|
||||||
)
|
|
||||||
|
|
||||||
|
msg_info "Detecting latest Kasm Workspaces release"
|
||||||
|
KASM_URL=$(curl -fsSL "https://www.kasm.com/downloads" | tr '\n' ' ' | grep -oE 'https://kasm-static-content[^"]*kasm_release_[0-9]+\.[0-9]+\.[0-9]+\.[a-z0-9]+\.tar\.gz' | head -n 1)
|
||||||
if [[ -z "$KASM_URL" ]]; then
|
if [[ -z "$KASM_URL" ]]; then
|
||||||
msg_error "Unable to detect latest Kasm release URL."
|
msg_error "Unable to detect latest Kasm release URL."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
KASM_VERSION=$(echo "$KASM_URL" | sed -E 's/.*kasm_release_([0-9]+\.[0-9]+\.[0-9]+).*/\1/')
|
KASM_VERSION=$(echo "$KASM_URL" | sed -E 's/.*kasm_release_([0-9]+\.[0-9]+\.[0-9]+).*/\1/')
|
||||||
msg_ok "Detected Kasm Workspaces version $KASM_VERSION"
|
msg_ok "Detected Kasm Workspaces version $KASM_VERSION"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user