Fix install log parsing (#7140)
This commit is contained in:
parent
8daa235a88
commit
66049f400c
@ -41,7 +41,7 @@
|
|||||||
"type": "warning"
|
"type": "warning"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": "Show password: `cat ~/kasm.creds`",
|
"text": "Show credentials: `cat ~/kasm.creds`",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -16,22 +16,22 @@ update_os
|
|||||||
msg_info "Installing Kasm Workspaces"
|
msg_info "Installing Kasm Workspaces"
|
||||||
KASM_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/')
|
KASM_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/')
|
||||||
curl -fsSL -o "/opt/kasm_release_${KASM_VERSION}.tar.gz" "https://kasm-static-content.s3.amazonaws.com/kasm_release_${KASM_VERSION}.tar.gz"
|
curl -fsSL -o "/opt/kasm_release_${KASM_VERSION}.tar.gz" "https://kasm-static-content.s3.amazonaws.com/kasm_release_${KASM_VERSION}.tar.gz"
|
||||||
|
|
||||||
cd /opt
|
cd /opt
|
||||||
tar -xf "kasm_release_${KASM_VERSION}.tar.gz"
|
tar -xf "kasm_release_${KASM_VERSION}.tar.gz"
|
||||||
chmod +x /opt/kasm_release/install.sh
|
chmod +x /opt/kasm_release/install.sh
|
||||||
printf 'y\ny\ny\n4\n' | bash /opt/kasm_release/install.sh > ~/kasm-install.output 2>&1
|
printf 'y\ny\ny\n4\n' | bash /opt/kasm_release/install.sh > ~/kasm-install.output 2>&1
|
||||||
cat ~/kasm-install.output | grep -A 20 -i "credentials\|login\|password\|admin" | sed '1i Kasm-Workspaces-Credentials' >~/kasm.creds
|
awk '
|
||||||
|
/^Kasm UI Login Credentials$/ {capture=1}
|
||||||
|
capture {print}
|
||||||
|
/^Service Registration Token$/ {in_token=1}
|
||||||
|
in_token && /^-+$/ {dash_count++}
|
||||||
|
in_token && dash_count==2 {exit}
|
||||||
|
' ~/kasm-install.output > ~/kasm.creds
|
||||||
msg_ok "Installed Kasm Workspaces"
|
msg_ok "Installed Kasm Workspaces"
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
customize
|
customize
|
||||||
|
|
||||||
msg_info "Displaying Kasm Credentials"
|
|
||||||
cat ~/kasm.creds
|
|
||||||
msg_ok "Kasm Credentials displayed"
|
|
||||||
|
|
||||||
msg_info "Cleaning up"
|
msg_info "Cleaning up"
|
||||||
rm -f /opt/kasm_release_${KASM_VERSION}.tar.gz
|
rm -f /opt/kasm_release_${KASM_VERSION}.tar.gz
|
||||||
rm -f ~/kasm-install.output
|
rm -f ~/kasm-install.output
|
||||||
|
Loading…
x
Reference in New Issue
Block a user