refactor: fix permission issue

This commit is contained in:
pratikbalar 2021-06-23 09:58:14 +05:30
parent 12eb5c92e4
commit 6c8c1c01be
2 changed files with 15 additions and 15 deletions

View File

@ -44,7 +44,7 @@ function configureEnv() {
} }
function checkConnection() { function checkConnection() {
/home/frappe/frappe-bench/env/bin/activate . /home/frappe/frappe-bench/env/bin/activate
python /home/frappe/frappe-bench/commands/check_connection.py python /home/frappe/frappe-bench/commands/check_connection.py
} }
@ -88,11 +88,11 @@ case "$1" in
LOAD_CONFIG_FILE="-c /home/frappe/frappe-bench/commands/gevent_patch.py" LOAD_CONFIG_FILE="-c /home/frappe/frappe-bench/commands/gevent_patch.py"
if [[ -n "${AUTO_MIGRATE}" ]]; then if [[ -n "${AUTO_MIGRATE}" ]]; then
/home/frappe/frappe-bench/env/bin/activate . /home/frappe/frappe-bench/env/bin/activate
python /home/frappe/frappe-bench/commands/auto_migrate.py python /home/frappe/frappe-bench/commands/auto_migrate.py
fi fi
/home/frappe/frappe-bench/env/bin/activate . /home/frappe/frappe-bench/env/bin/activate
gunicorn ${LOAD_CONFIG_FILE} -b 0.0.0.0:${FRAPPE_PORT} \ gunicorn ${LOAD_CONFIG_FILE} -b 0.0.0.0:${FRAPPE_PORT} \
--worker-tmp-dir /dev/shm \ --worker-tmp-dir /dev/shm \
--threads=4 \ --threads=4 \
@ -107,7 +107,7 @@ case "$1" in
checkConnection checkConnection
# default WORKER_TYPE=default # default WORKER_TYPE=default
/home/frappe/frappe-bench/env/bin/activate . /home/frappe/frappe-bench/env/bin/activate
python /home/frappe/frappe-bench/commands/worker.py python /home/frappe/frappe-bench/commands/worker.py
;; ;;
@ -115,7 +115,7 @@ case "$1" in
checkConfigExists checkConfigExists
checkConnection checkConnection
/home/frappe/frappe-bench/env/bin/activate . /home/frappe/frappe-bench/env/bin/activate
python /home/frappe/frappe-bench/commands/background.py python /home/frappe/frappe-bench/commands/background.py
;; ;;
@ -124,7 +124,7 @@ case "$1" in
checkConfigExists checkConfigExists
checkConnection checkConnection
/home/frappe/frappe-bench/env/bin/activate . /home/frappe/frappe-bench/env/bin/activate
python /home/frappe/frappe-bench/commands/new.py python /home/frappe/frappe-bench/commands/new.py
exit exit
;; ;;
@ -133,26 +133,26 @@ case "$1" in
checkConfigExists checkConfigExists
checkConnection checkConnection
/home/frappe/frappe-bench/env/bin/activate . /home/frappe/frappe-bench/env/bin/activate
python /home/frappe/frappe-bench/commands/drop.py python /home/frappe/frappe-bench/commands/drop.py
exit exit
;; ;;
migrate) migrate)
/home/frappe/frappe-bench/env/bin/activate . /home/frappe/frappe-bench/env/bin/activate
python /home/frappe/frappe-bench/commands/migrate.py python /home/frappe/frappe-bench/commands/migrate.py
exit exit
;; ;;
doctor) doctor)
/home/frappe/frappe-bench/env/bin/activate . /home/frappe/frappe-bench/env/bin/activate
python /home/frappe/frappe-bench/commands/doctor.py "${@:2}" python /home/frappe/frappe-bench/commands/doctor.py "${@:2}"
exit exit
;; ;;
backup) backup)
/home/frappe/frappe-bench/env/bin/activate . /home/frappe/frappe-bench/env/bin/activate
python /home/frappe/frappe-bench/commands/backup.py python /home/frappe/frappe-bench/commands/backup.py
exit exit
;; ;;
@ -164,19 +164,19 @@ case "$1" in
exit 1 exit 1
fi fi
/home/frappe/frappe-bench/env/bin/activate . /home/frappe/frappe-bench/env/bin/activate
python /home/frappe/frappe-bench/commands/console.py "$2" python /home/frappe/frappe-bench/commands/console.py "$2"
exit exit
;; ;;
push-backup) push-backup)
/home/frappe/frappe-bench/env/bin/activate . /home/frappe/frappe-bench/env/bin/activate
python /home/frappe/frappe-bench/commands/push_backup.py python /home/frappe/frappe-bench/commands/push_backup.py
exit exit
;; ;;
restore-backup) restore-backup)
/home/frappe/frappe-bench/env/bin/activate . /home/frappe/frappe-bench/env/bin/activate
python /home/frappe/frappe-bench/commands/restore_backup.py python /home/frappe/frappe-bench/commands/restore_backup.py
exit exit
;; ;;

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/bin/bash -ex
APP_NAME=${1} APP_NAME=${1}
APP_REPO=${2} APP_REPO=${2}
@ -6,7 +6,7 @@ APP_BRANCH=${3}
cd /home/frappe/frappe-bench/ cd /home/frappe/frappe-bench/
env/bin/activate . env/bin/activate
cd ./apps cd ./apps