Compare commits

..
Author SHA1 Message Date
MickLesk 4a4cbc99a7 kasm: survive a failed release lookup and answer the installer with flags
The lookup ran under pipefail with no timeout: a page without the link
ended the install at `head -1`, a stalled connection hung it for half an
hour, and the fallback version never ran. The installer takes
--accept-eula, --no-swap-check and --no-check-disk; piped answers
shifted with the prompts, and a "y" to the swap question tried swapon
inside the container.
2026-10-23 11:39:05 +02:00
2 changed files with 8 additions and 15 deletions

No files matched your search

+4 -4
View File
@@ -37,10 +37,10 @@ fi
msg_ok "Installed Docker"
msg_info "Detecting latest Kasm Workspaces release"
KASM_URL=$(curl -s https://kasm.com/downloads \
KASM_URL=$(curl -s --max-time 30 https://kasm.com/downloads \
| grep -oP 'https://kasm-static-content\.s3\.amazonaws\.com/kasm_release_\d+\.\d+\.\d+-latest\.tar\.gz' \
| head -1)
KASM_VERSION=$(echo "$KASM_URL" | grep -oP '\d+\.\d+\.\d+(?=-latest)')
| head -1 || true)
KASM_VERSION=$(echo "$KASM_URL" | grep -oP '\d+\.\d+\.\d+(?=-latest)' || true)
# Fallback to predefined version if online lookup failed.
if [[ -z "$KASM_VERSION" ]] || [[ -z "$KASM_URL" ]]; then
@@ -63,7 +63,7 @@ curl_download "/opt/kasm_release_${KASM_VERSION}.tar.gz" "$KASM_URL"
cd /opt
tar -xf "kasm_release_${KASM_VERSION}.tar.gz"
chmod +x /opt/kasm_release/install.sh
printf 'y\ny\ny\n4\n' | bash /opt/kasm_release/install.sh --ignore-dep-failures >~/kasm-install.output 2>&1
bash /opt/kasm_release/install.sh --accept-eula --no-swap-check --no-check-disk --ignore-dep-failures >~/kasm-install.output 2>&1
awk '
/^Kasm UI Login Credentials$/ {capture=1}
capture {print}
+4 -11
View File
@@ -14,11 +14,9 @@ network_check
update_os
setup_deb_based() {
ver="${var_postgresql_version:-}"
[[ -n "$ver" ]] || read -r -p "${TAB3}Enter PostgreSQL version (15/16/17/18) [17]: " ver || true
ver="${ver:-17}"
read -r -p "${TAB3}Enter PostgreSQL version (15/16/17/18): " ver
[[ $ver =~ ^(15|16|17|18)$ ]] || {
msg_error "Invalid PostgreSQL version: ${ver} (expected 15, 16, 17 or 18)"
echo "Invalid version"
exit 64
}
PG_VERSION=$ver setup_postgresql
@@ -138,13 +136,8 @@ EOF
}
setup_alpine() {
ver="${var_postgresql_version:-}"
[[ -n "$ver" ]] || read -r -p "${TAB3}Enter PostgreSQL version (16/17/18) [17]: " ver || true
ver="${ver:-17}"
[[ $ver =~ ^(16|17|18)$ ]] || {
msg_error "Invalid PostgreSQL version: ${ver} (expected 16, 17 or 18)"
exit 64
}
read -r -p "${TAB3}Enter PostgreSQL version (15/16/17): " ver
[[ $ver =~ ^(15|16|17)$ ]] || { echo "Invalid version"; exit 64; }
msg_info "Installing PostgreSQL ${ver}"
$STD apk add --no-cache postgresql${ver} postgresql${ver}-contrib postgresql${ver}-openrc sudo