2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2024-09-19 18:49:01 +00:00

Merge pull request #556 from vrslev/fix-drop-flags

fix(frappe-worker): Drop flags
This commit is contained in:
Revant Nandgaonkar 2021-11-09 22:20:20 +05:30 committed by GitHub
commit f0997dbf23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -133,19 +133,22 @@ 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
# shellcheck disable=SC2086
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)