File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 4141 "type" : " warning"
4242 },
4343 {
44- "text" : " Show password : `cat ~/kasm.creds`" ,
44+ "text" : " Show credentials : `cat ~/kasm.creds`" ,
4545 "type" : " info"
4646 }
4747 ]
Original file line number Diff line number Diff line change @@ -16,22 +16,22 @@ update_os
1616msg_info " Installing Kasm Workspaces"
1717KASM_VERSION=$( curl -fsSL ' https://www.kasmweb.com/downloads' | grep -o ' https://kasm-static-content.s3.amazonaws.com/kasm_release_[^"]*\.tar\.gz' | head -n 1 | sed -E ' s/.*release_(.*)\.tar\.gz/\1/' )
1818curl -fsSL -o " /opt/kasm_release_${KASM_VERSION} .tar.gz" " https://kasm-static-content.s3.amazonaws.com/kasm_release_${KASM_VERSION} .tar.gz"
19-
2019cd /opt
2120tar -xf " kasm_release_${KASM_VERSION} .tar.gz"
2221chmod +x /opt/kasm_release/install.sh
2322printf ' y\ny\ny\n4\n' | bash /opt/kasm_release/install.sh > ~ /kasm-install.output 2>&1
24- cat ~ /kasm-install.output | grep -A 20 -i " credentials\|login\|password\|admin" | sed ' 1i Kasm-Workspaces-Credentials' > ~/kasm.creds
25-
23+ awk '
24+ /^Kasm UI Login Credentials$/ {capture=1}
25+ capture {print}
26+ /^Service Registration Token$/ {in_token=1}
27+ in_token && /^-+$/ {dash_count++}
28+ in_token && dash_count==2 {exit}
29+ ' ~ /kasm-install.output > ~ /kasm.creds
2630msg_ok " Installed Kasm Workspaces"
2731
2832motd_ssh
2933customize
3034
31- msg_info " Displaying Kasm Credentials"
32- cat ~ /kasm.creds
33- msg_ok " Kasm Credentials displayed"
34-
3535msg_info " Cleaning up"
3636rm -f /opt/kasm_release_${KASM_VERSION} .tar.gz
3737rm -f ~ /kasm-install.output
You can’t perform that action at this time.
0 commit comments