From 7d562f9e85d23f84376de2c101e2092bf15acf34 Mon Sep 17 00:00:00 2001 From: Athanasios Voutsadakis Date: Wed, 28 Feb 2018 14:36:40 +0000 Subject: [PATCH] Get empty array when no .pid file exists --- scripts/run_multi_worker_app_paas.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/run_multi_worker_app_paas.sh b/scripts/run_multi_worker_app_paas.sh index 3b716a505..0f9ea3459 100755 --- a/scripts/run_multi_worker_app_paas.sh +++ b/scripts/run_multi_worker_app_paas.sh @@ -77,7 +77,11 @@ function on_exit { } function get_celery_pids { - APP_PIDS=`cat celery*.pid` + if [[ $(ls /home/vcap/app/celery*.pid) ]]; then + APP_PIDS=`cat /home/vcap/app/celery*.pid` + else + APP_PIDS=() + fi } function start_application {