summaryrefslogtreecommitdiff
path: root/install/ishtar-prepare-instance
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2023-01-12 16:16:48 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2023-01-12 16:16:48 +0100
commit02a81e55ed914b4c4eae1d0051ead4ec107b6a31 (patch)
treec93c16b841ab5ef1beb6fb7e178225c9322afb95 /install/ishtar-prepare-instance
parent061edbaac5a37b8e717391c3b7d804a96c041979 (diff)
downloadIshtar-02a81e55ed914b4c4eae1d0051ead4ec107b6a31.tar.bz2
Ishtar-02a81e55ed914b4c4eae1d0051ead4ec107b6a31.zip
Install script: fix prepare and delete instance scripts
Diffstat (limited to 'install/ishtar-prepare-instance')
-rwxr-xr-xinstall/ishtar-prepare-instance14
1 files changed, 6 insertions, 8 deletions
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