mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-11-19 20:15:16 +00:00
refactor
This commit is contained in:
19
ct/kasm.sh
19
ct/kasm.sh
@@ -31,7 +31,6 @@ function update_script() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
msg_info "Updating Kasm"
|
msg_info "Updating Kasm"
|
||||||
msg_info "Downloading Update"
|
|
||||||
cd /tmp
|
cd /tmp
|
||||||
KASM_URL=$(curl -fsSL "https://www.kasm.com/downloads" \
|
KASM_URL=$(curl -fsSL "https://www.kasm.com/downloads" \
|
||||||
| tr '\n' ' ' \
|
| tr '\n' ' ' \
|
||||||
@@ -47,24 +46,20 @@ function update_script() {
|
|||||||
msg_warn "WARNING: This script will run an external installer from a third-party source (https://www.kasmweb.com/)."
|
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 "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_warn "If you have any doubts or concerns, please review the installer code before proceeding:"
|
||||||
msg_custom "${TAB3}${GATEWAY}${BGN}${CL}" "\e[1;34m" "→ install.sh inside tar.gz $KASM_URL"
|
msg_custom "${TAB3}${GATEWAY}${BGN}${CL}" "\e[1;34m" "→ upgrade.sh inside tar.gz $KASM_URL"
|
||||||
echo
|
echo
|
||||||
read -r -p "${TAB3}Do you want to continue? [y/N]: " CONFIRM
|
read -r -p "${TAB3}Do you want to continue? [y/N]: " CONFIRM
|
||||||
if [[ ! "$CONFIRM" =~ ^([yY][eE][sS]|[yY])$ ]]; then
|
if [[ ! "$CONFIRM" =~ ^([yY][eE][sS]|[yY])$ ]]; then
|
||||||
msg_error "Aborted by user. No changes have been made."
|
msg_error "Aborted by user. No changes have been made."
|
||||||
exit 10
|
exit 10
|
||||||
fi
|
fi
|
||||||
|
curl -fsSL -o "/tmp/kasm_release_${KASM_VERSION}.tar.gz" "$KASM_URL"
|
||||||
curl -fsSL -o "/opt/kasm_release_${KASM_VERSION}.tar.gz" "$KASM_URL"
|
|
||||||
cd /tmp
|
|
||||||
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 /tmp/kasm_release/install.sh
|
||||||
rm -f /opt/kasm_release_${KASM_VERSION}.tar.gz
|
rm -f /tmp/kasm_release_${KASM_VERSION}.tar.gz
|
||||||
msg_ok "Downloaded Update"
|
|
||||||
|
$STD bash /tmp/kasm_release/upgrade.sh --proxy-port 443
|
||||||
msg_info "Executing Update Script"
|
rm -rf /tmp/kasm_release
|
||||||
$STD bash kasm_release/upgrade.sh --proxy-port 443
|
|
||||||
msg_ok "Executed Update Script"
|
|
||||||
msg_ok "Updated Successfully"
|
msg_ok "Updated Successfully"
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user