From 433671bea5bfac8ea473017401e17bee61b7a197 Mon Sep 17 00:00:00 2001 From: Daniel Hansson Date: Fri, 14 Aug 2020 23:24:13 +0200 Subject: [PATCH] be certain that home is created --- apps/tmbitwarden.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/apps/tmbitwarden.sh b/apps/tmbitwarden.sh index baad3114..7b7c4bf6 100644 --- a/apps/tmbitwarden.sh +++ b/apps/tmbitwarden.sh @@ -95,6 +95,18 @@ else useradd -s /bin/bash -d "$BITWARDEN_HOME/" -m -G docker "$BITWARDEN_USER" fi +# Wait for home to be created +while : +do + if ! ls "$BITWARDEN_HOME" >/dev/null 2>&1 + then + print_text_in_color "$ICyan" "Waiting for $BITWARDEN_HOME to be created" + sleep 1 + else + break + fi +done + # Create the service print_text_in_color "$ICyan" "Creating the Bitwarden service..."