1
0
mirror of https://github.com/community-scripts/ProxmoxVE.git synced 2025-05-04 21:23:10 +00:00

Fix access URL (#4199)

This commit is contained in:
Slaviša Arežina 2025-05-03 18:48:07 +02:00 committed by GitHub
parent 64595b08ce
commit 783e7518f8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -76,12 +76,12 @@ function update_script() {
msg_ok "Stopped Vaultwarden" msg_ok "Stopped Vaultwarden"
msg_info "Updating Web-Vault to $WVRELEASE" msg_info "Updating Web-Vault to $WVRELEASE"
$STD curl -fsSLO https://github.com/dani-garcia/bw_web_builds/releases/download/$WVRELEASE/bw_web_$WVRELEASE.tar.gz $STD curl -fsSLO https://github.com/dani-garcia/bw_web_builds/releases/download/"$WVRELEASE"/bw_web_"$WVRELEASE".tar.gz
$STD tar -zxf bw_web_$WVRELEASE.tar.gz -C /opt/vaultwarden/ $STD tar -zxf bw_web_"$WVRELEASE".tar.gz -C /opt/vaultwarden/
msg_ok "Updated Web-Vault" msg_ok "Updated Web-Vault"
msg_info "Cleaning up" msg_info "Cleaning up"
rm bw_web_$WVRELEASE.tar.gz rm bw_web_"$WVRELEASE".tar.gz
msg_ok "Cleaned" msg_ok "Cleaned"
msg_info "Starting Vaultwarden" msg_info "Starting Vaultwarden"
@ -94,7 +94,7 @@ function update_script() {
if NEWTOKEN=$(whiptail --backtitle "Proxmox VE Helper Scripts" --passwordbox "Set the ADMIN_TOKEN" 10 58 3>&1 1>&2 2>&3); then if NEWTOKEN=$(whiptail --backtitle "Proxmox VE Helper Scripts" --passwordbox "Set the ADMIN_TOKEN" 10 58 3>&1 1>&2 2>&3); then
if [[ -z "$NEWTOKEN" ]]; then exit; fi if [[ -z "$NEWTOKEN" ]]; then exit; fi
if ! command -v argon2 >/dev/null 2>&1; then $STD apt-get install -y argon2; fi if ! command -v argon2 >/dev/null 2>&1; then $STD apt-get install -y argon2; fi
TOKEN=$(echo -n ${NEWTOKEN} | argon2 "$(openssl rand -base64 32)" -t 2 -m 16 -p 4 -l 64 -e) TOKEN=$(echo -n "${NEWTOKEN}" | argon2 "$(openssl rand -base64 32)" -t 2 -m 16 -p 4 -l 64 -e)
sed -i "s|ADMIN_TOKEN=.*|ADMIN_TOKEN='${TOKEN}'|" /opt/vaultwarden/.env sed -i "s|ADMIN_TOKEN=.*|ADMIN_TOKEN='${TOKEN}'|" /opt/vaultwarden/.env
if [[ -f /opt/vaultwarden/data/config.json ]]; then if [[ -f /opt/vaultwarden/data/config.json ]]; then
sed -i "s|\"admin_token\":.*|\"admin_token\": \"${TOKEN}\"|" /opt/vaultwarden/data/config.json sed -i "s|\"admin_token\":.*|\"admin_token\": \"${TOKEN}\"|" /opt/vaultwarden/data/config.json
@ -112,4 +112,4 @@ description
msg_ok "Completed Successfully!\n" msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following URL:${CL}" echo -e "${INFO}${YW} Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8000${CL}" echo -e "${TAB}${GATEWAY}${BGN}https://${IP}:8000${CL}"