Kasm: show the installer's last lines when it fails

The installer writes to ~/kasm-install.output, so a failure reached the trace with no output at all. The last 25 lines now go to the install log and the script exits with the installer's code.
This commit is contained in:
MickLesk committed 2026-11-20 17:10:36 +01:00
1 parent 01e23a0c50
commit e9726eb851
1 file changed
+6 -1
+6 -1
View File
@@ -63,7 +63,12 @@ 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
bash /opt/kasm_release/install.sh --accept-eula --no-swap-check --no-check-disk --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 || {
KASM_RC=$?
$STD tail -n 25 ~/kasm-install.output
msg_error "The Kasm installer failed (exit ${KASM_RC}), see ~/kasm-install.output"
exit "$KASM_RC"
}
awk '
/^Kasm UI Login Credentials$/ {capture=1}
capture {print}