feat: add drop site command to worker

This commit is contained in:
sahil28297
2020-10-01 14:12:55 +05:30
parent c104d027f9
commit 94a37d68e3
3 changed files with 52 additions and 0 deletions

View File

@@ -149,6 +149,18 @@ elif [ "$1" = 'new' ]; then
python /home/frappe/frappe-bench/commands/new.py
fi
elif [ "$1" = 'drop' ]; then
checkConfigExists
checkConnection
if [[ -z "$RUN_AS_ROOT" ]]; then
su frappe -c ". /home/frappe/frappe-bench/env/bin/activate \
&& python /home/frappe/frappe-bench/commands/drop.py"
exit
else
. /home/frappe/frappe-bench/env/bin/activate
python /home/frappe/frappe-bench/commands/drop.py
fi
elif [ "$1" = 'migrate' ]; then
su frappe -c ". /home/frappe/frappe-bench/env/bin/activate \