Skip to content

Commit 035c691

Browse files
authored
fix #786 (#809)
Check if Bitwarden is installed and upgrade it while Apache2 is stopped.
1 parent 779cf4d commit 035c691

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

nextcloud_update.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,27 @@ Please check in $BACKUP if the folders exist."
395395
exit 1
396396
fi
397397

398+
# Update Bitwarden
399+
if [ "$(docker ps -a >/dev/null 2>&1 && echo yes || echo no)" == "yes" ]
400+
then
401+
if docker ps -a --format '{{.Names}}' | grep -Eq "bitwarden";
402+
then
403+
if [ "$(dpkg-query -W -f='${Status}' "apache2" 2>/dev/null | grep -c "ok installed")" == "1" ]
404+
then
405+
if [ -d /root/bwdata ]
406+
then
407+
if [ -f /root/bitwarden.sh ]
408+
then
409+
print_text_in_color "$IGreen" "Upgrading Bitwarden..."
410+
sleep 2
411+
bash /root/bitwarden.sh updateself
412+
bash /root/bitwarden.sh update
413+
fi
414+
fi
415+
fi
416+
fi
417+
fi
418+
398419
# Start Apache2
399420
start_if_stopped apache2
400421

0 commit comments

Comments
 (0)