summaryrefslogtreecommitdiff
path: root/install/ishtar-prepare-instance
diff options
context:
space:
mode:
Diffstat (limited to 'install/ishtar-prepare-instance')
-rwxr-xr-xinstall/ishtar-prepare-instance21
1 files changed, 12 insertions, 9 deletions
diff --git a/install/ishtar-prepare-instance b/install/ishtar-prepare-instance
index c47881bad..f176d8f90 100755
--- a/install/ishtar-prepare-instance
+++ b/install/ishtar-prepare-instance
@@ -260,14 +260,14 @@ EOF
/usr/sbin/rabbitmqctl set_permissions -p /ishtar$INSTANCE ishtar$INSTANCE ".*" ".*" ".*"
CELERY_CONF="CELERY_BROKER_URL = 'amqp://ishtar"$INSTANCE":"$RBMQ_PASSWORD"@localhost//ishtar"$INSTANCE"'"
CELERY_BIN_PATH=`which celery`
- sed -s "s|#APP_NAME#|$INSTANCE|g;\
- s|#CELERY_BIN_PATH#|$CELERY_BIN_PATH|g;" \
- "install/celeryd.default.template" > \
- "/etc/default/celeryd-"$INSTANCE
+
+ # supervisor conf no matter what
+ mkdir -p /etc/supervisor/conf.d/
sed -s "s|#APP_NAME#|$INSTANCE|g;\
s|#INSTALL_PATH#|$INSTALL_PATH|g;"\
- "install/celery.service.template" > \
- "/etc/systemd/system/celery-"$INSTANCE".service"
+ "install/supervisor.template" > \
+ "/etc/supervisor/conf.d/celery_"$INSTANCE".conf"
+
sed -s "s|example_project|$INSTANCE|g;" \
$INSTANCE"/celery_app.py.sample" > \
$INSTANCE"/celery_app.py"
@@ -276,7 +276,7 @@ EOF
"install/monit.template" > \
"/etc/monit/conf-available/celery-"$INSTANCE
fi
- systemctl daemon-reload
+
fi
### __init__.py
@@ -386,8 +386,11 @@ EOF
### Celery - start worker
if [ $USE_CELERY = 'yes' ]; then
- systemctl enable celery-$INSTANCE
- systemctl start celery-$INSTANCE
+ SUPERVISOR=`which supervisorctl`
+ if [ $SUPERVISOR ]; then
+ supervisorctl add celery_$INSTANCE
+ supervisorctl start celery_$INSTANCE
+ fi
fi
cecho y " - create superuser"