From f48f0b26109dfbd12bacf416c1b2550f19cf2383 Mon Sep 17 00:00:00 2001 From: Emilie Date: Fri, 23 Mar 2018 18:42:10 +0100 Subject: [PATCH] [dev] : add wait for db --- dev/local/restore_db.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dev/local/restore_db.sh b/dev/local/restore_db.sh index 73fd180..944b370 100755 --- a/dev/local/restore_db.sh +++ b/dev/local/restore_db.sh @@ -4,6 +4,10 @@ # export POSTGRES="$(dpkg --get-selections | grep postgres 2>&1)" # export MYSQL="$(dpkg --get-selections | grep mysql 2>&1)" +# wait for db +/srv/bin/misc/wait.sh + +# import database functions of type if [ ! -z "$MYSQL_ROOT_PASSWORD" ]; then export MYSQL_PWD=$MYSQL_ROOT_PASSWORD gunzip < /srv/backup/mariadb.dump.gz | mysql -h db $MYSQL_DATABASE -uroot -- 2.39.5