Update vaultwarden-update.sh
This commit is contained in:
parent
be5b8d597c
commit
d017b5ccdb
1 changed files with 7 additions and 10 deletions
|
@ -31,6 +31,8 @@ while true; do
|
||||||
done
|
done
|
||||||
clear
|
clear
|
||||||
update_info
|
update_info
|
||||||
|
echo -e "${GN} Stopping Vaultwarden... ${CL}"
|
||||||
|
systemctl stop vaultwarden.service
|
||||||
|
|
||||||
echo -e "${GN} Updating to ${VWRELEASE}... ${CL}"
|
echo -e "${GN} Updating to ${VWRELEASE}... ${CL}"
|
||||||
wget https://github.com/dani-garcia/bw_web_builds/releases/download/$VWRELEASE/bw_web_$VWRELEASE.tar.gz &>/dev/null
|
wget https://github.com/dani-garcia/bw_web_builds/releases/download/$VWRELEASE/bw_web_$VWRELEASE.tar.gz &>/dev/null
|
||||||
|
@ -40,13 +42,8 @@ cp -R web-vault /var/lib/vaultwarden/ &>/dev/null
|
||||||
echo -e "${GN} Cleanup... ${CL}"
|
echo -e "${GN} Cleanup... ${CL}"
|
||||||
rm -r bw_web_$VWRELEASE.tar.gz web-vault
|
rm -r bw_web_$VWRELEASE.tar.gz web-vault
|
||||||
sleep 2
|
sleep 2
|
||||||
echo -e "${GN} Finished Update, Please Reboot Vaultwarden ${CL}"
|
|
||||||
while true; do
|
echo -e "${GN} Starting Vaultwarden... ${CL}"
|
||||||
read -p "Reboot Now? (y/n)" yn
|
systemctl start vaultwarden.service
|
||||||
case $yn in
|
sleep 1
|
||||||
[Yy]* ) break;;
|
echo -e "${GN} Finished Update ${CL}"
|
||||||
[Nn]* ) exit;;
|
|
||||||
* ) echo "Please answer yes or no.";;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
reboot
|
|
||||||
|
|
Loading…
Reference in a new issue