Update vaultwarden-v5.sh

get admin token in updates
This commit is contained in:
tteckster 2023-01-01 19:40:59 -05:00 committed by GitHub
parent 5053a545ee
commit 9d4543859c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -315,15 +315,16 @@ WVRELEASE=$(curl -s https://api.github.com/repos/dani-garcia/bw_web_builds/relea
grep "tag_name" |
awk '{print substr($2, 2, length($2)-3) }')
UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 2 \
UPD=$(whiptail --title "UPDATE" --radiolist --cancel-button Exit-Script "Choose Type" 8 58 3 \
"1" "VaultWarden $VAULT" ON \
"2" "Web-Vault $WVRELEASE" OFF \
"3" "Get Admin Token" OFF \
3>&1 1>&2 2>&3)
clear
header_info
echo -e "\n ⚠️ Ensure you set 2vCPU & 3072MiB RAM MIMIMUM!!! \n"
if [ "$UPD" == "1" ]; then
echo -e "\n ⚠️ Ensure you set 2vCPU & 3072MiB RAM MIMIMUM!!! \n"
msg_info "Stopping Vaultwarden"
systemctl stop vaultwarden.service
msg_ok "Stopped Vaultwarden"
@ -373,6 +374,10 @@ msg_ok "Started Vaultwarden"
msg_ok "$WVRELEASE Update Successful"
exit;
fi
if [ "$UPD" == "3" ]; then
cat /opt/vaultwarden/.env | grep "ADMIN_TOKEN"
exit
fi
}
clear