From a2db23e68eb68040f95881593ce0b6101f364f2a Mon Sep 17 00:00:00 2001 From: Lev Date: Tue, 9 Nov 2021 16:49:40 +0300 Subject: [PATCH] fix(frappe-worker): Drop flags --- build/frappe-worker/docker-entrypoint.sh | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/build/frappe-worker/docker-entrypoint.sh b/build/frappe-worker/docker-entrypoint.sh index 6695ea7b..d10f9233 100755 --- a/build/frappe-worker/docker-entrypoint.sh +++ b/build/frappe-worker/docker-entrypoint.sh @@ -133,19 +133,21 @@ drop) : "${DB_ROOT_PASSWORD:=$POSTGRES_PASSWORD}" : "${DB_ROOT_PASSWORD:=$MYSQL_ROOT_PASSWORD}" : "${DB_ROOT_PASSWORD:=admin}" - if [[ -n $NO_BACKUP ]]; then - NO_BACKUP=--no-backup + + FLAGS= + if [[ ${NO_BACKUP} == 1 ]]; then + FLAGS="${FLAGS} --no-backup" fi - if [[ -n $FORCE ]]; then - FORCE=--force + if [[ ${FORCE} == 1 ]]; then + FLAGS="${FLAGS} --force" fi bench drop-site \ - $SITE_NAME \ - --root-login $DB_ROOT_USER \ - --root-password $DB_ROOT_PASSWORD \ + ${SITE_NAME} \ + --root-login ${DB_ROOT_USER} \ + --root-password ${DB_ROOT_PASSWORD} \ --archived-sites-path /home/frappe/frappe-bench/sites/archive_sites \ - $NO_BACKUP $FORCE + ${FLAGS} ;; migrate)