Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/vm.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/bitwarden_mailconfig.sh22
-rw-r--r--apps/bitwarden_registration.sh5
2 files changed, 25 insertions, 2 deletions
diff --git a/apps/bitwarden_mailconfig.sh b/apps/bitwarden_mailconfig.sh
index 63ed93e0..6ed75b7e 100644
--- a/apps/bitwarden_mailconfig.sh
+++ b/apps/bitwarden_mailconfig.sh
@@ -166,7 +166,15 @@ fi
# Stop bitwarden
systemctl stop bitwarden
-countdown "Waiting for Bitwarden to stop..." "30"
+while :
+do
+ if systemctl status bitwarden | grep -q 'Active: active' > /dev/null 2>&1
+ then
+ sleep 3
+ else
+ break
+ fi
+done
# Write to files
# mailserver
@@ -195,7 +203,17 @@ check_command sed -i "s|^globalSettings__mail__smtp__password=.*|globalSettings_
check_command sed -i "s|^adminSettings__admins=.*|adminSettings__admins=$ADMIN_ACCOUNT|g" "$BITWARDEN_HOME"/bwdata/env/global.override.env
# Start Bitwarden
-start_if_stopped bitwarden
+systemctl start bitwarden
+while :
+do
+ if ! systemctl status bitwarden | grep -q 'Active: active' > /dev/null 2>&1
+ then
+ sleep 3
+ else
+ break
+ fi
+done
+
msg_box "Your Bitwarden mailserver settings should be successfully changed by now.
If you experience any issues, please report them to $ISSUES"
diff --git a/apps/bitwarden_registration.sh b/apps/bitwarden_registration.sh
index 4866ebce..da977abb 100644
--- a/apps/bitwarden_registration.sh
+++ b/apps/bitwarden_registration.sh
@@ -92,6 +92,11 @@ case "$choice" in
check_command systemctl restart bitwarden
fi
;;
+ "")
+ exit
+ ;;
*)
;;
esac
+
+msg_box "Bitwarden is now restarting. This can take a few minutes. Please wait until it is done."