From 02a81e55ed914b4c4eae1d0051ead4ec107b6a31 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 12 Jan 2023 16:16:48 +0100 Subject: Install script: fix prepare and delete instance scripts --- install/ishtar-prepare-instance | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'install/ishtar-prepare-instance') diff --git a/install/ishtar-prepare-instance b/install/ishtar-prepare-instance index f176d8f90..bafc6133d 100755 --- a/install/ishtar-prepare-instance +++ b/install/ishtar-prepare-instance @@ -271,12 +271,10 @@ EOF sed -s "s|example_project|$INSTANCE|g;" \ $INSTANCE"/celery_app.py.sample" > \ $INSTANCE"/celery_app.py" - if [ -d "$DIRECTORY" ]; then - sed -s "s|#APP_NAME#|$INSTANCE|g;" \ - "install/monit.template" > \ - "/etc/monit/conf-available/celery-"$INSTANCE - fi - + mkdir -p /etc/monit/conf-available/ + sed -s "s|#APP_NAME#|$INSTANCE|g;" \ + "install/monit.template" > \ + "/etc/monit/conf-available/celery-"$INSTANCE fi ### __init__.py @@ -388,8 +386,8 @@ EOF if [ $USE_CELERY = 'yes' ]; then SUPERVISOR=`which supervisorctl` if [ $SUPERVISOR ]; then - supervisorctl add celery_$INSTANCE - supervisorctl start celery_$INSTANCE + supervisorctl reload || (true && cecho r "supervisorctl reload - failed") + supervisorctl start celery_$INSTANCE || (true && cecho r "supervisorctl start celery_$INSTANCE - failed") fi fi -- cgit v1.2.3