diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2020-01-31 16:33:22 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2020-07-01 18:02:28 +0200 |
commit | 1f89e132119d101b6b8844c49b4cd06df009e308 (patch) | |
tree | b6128e51d4e2a0244a20f6bf14fbf4293015cf57 /install | |
parent | ceb65586300bca1af506976b6aa2f84d58861a65 (diff) | |
download | Ishtar-1f89e132119d101b6b8844c49b4cd06df009e308.tar.bz2 Ishtar-1f89e132119d101b6b8844c49b4cd06df009e308.zip |
ishtar-delete-instance: fix deletion when celery is disabled
Diffstat (limited to 'install')
-rwxr-xr-x | install/ishtar-delete-instance | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/install/ishtar-delete-instance b/install/ishtar-delete-instance index 46b0d86c6..c77ffaa34 100755 --- a/install/ishtar-delete-instance +++ b/install/ishtar-delete-instance @@ -86,7 +86,14 @@ do_delete_instance() { rm -f "$UWSGI_AVAILABLE_PATH/ishtar-$INSTANCE.ini" rm -f "$UWSGI_ENABLE_PATH/ishtar-$INSTANCE.ini" - if [ -v USE_CELERY ]; then + DB_NAME="ishtar-$INSTANCE" + export DB_NAME + su postgres <<'EOF' + dropdb "$DB_NAME" + dropuser "$DB_NAME" +EOF + + if [ -v $USE_CELERY ]; then systemctl disable celery-$INSTANCE systemctl stop celery-$INSTANCE /usr/sbin/rabbitmqctl delete_vhost /ishtar$INSTANCE @@ -96,13 +103,6 @@ do_delete_instance() { systemctl daemon-reload fi - DB_NAME="ishtar-$INSTANCE" - export DB_NAME - su postgres <<'EOF' - dropdb "$DB_NAME" - dropuser "$DB_NAME" -EOF - echo "" cecho g $to_delete" have been completly removed" echo "" |