diff options
| -rwxr-xr-x | install/ishtar-delete-instance | 2 | ||||
| -rwxr-xr-x | install/ishtar-prepare-instance | 20 | 
2 files changed, 12 insertions, 10 deletions
| diff --git a/install/ishtar-delete-instance b/install/ishtar-delete-instance index c77ffaa34..a8b68b849 100755 --- a/install/ishtar-delete-instance +++ b/install/ishtar-delete-instance @@ -93,7 +93,7 @@ do_delete_instance() {          dropuser "$DB_NAME"  EOF -    if [ -v $USE_CELERY ]; then +    if [ $USE_CELERY = 'yes' ]; then          systemctl disable celery-$INSTANCE          systemctl stop celery-$INSTANCE          /usr/sbin/rabbitmqctl delete_vhost /ishtar$INSTANCE diff --git a/install/ishtar-prepare-instance b/install/ishtar-prepare-instance index 098f1d486..b21ed7a0f 100755 --- a/install/ishtar-prepare-instance +++ b/install/ishtar-prepare-instance @@ -253,7 +253,7 @@ EOF      # manage celery daemon      CELERY_CONF="" -    if [ -v $USE_CELERY ]; then +    if [ $USE_CELERY == 'yes' ]; then          RBMQ_PASSWORD=$(apg -a 0 -M ncl -n 1 -x 10 -m 10)          /usr/sbin/rabbitmqctl add_vhost /ishtar$INSTANCE          /usr/sbin/rabbitmqctl add_user ishtar$INSTANCE $RBMQ_PASSWORD @@ -269,15 +269,17 @@ EOF          sed -s "s|example_project|$INSTANCE|g;" \              $INSTANCE"/celery_app.py.sample" > \              $INSTANCE"/celery_app.py" -        sed -s "s|#APP_NAME#|$INSTANCE|g;" \ -            "install/monit.template" > \ -            "/etc/monit/conf-available/celery-"$INSTANCE +	if [ -d "$DIRECTORY" ]; then +            sed -s "s|#APP_NAME#|$INSTANCE|g;" \ +                "install/monit.template" > \ +                "/etc/monit/conf-available/celery-"$INSTANCE +	fi          systemctl daemon-reload      fi      ### __init__.py      cd $INSTANCE -    if [ -v $USE_CELERY ]; then +    if [ $USE_CELERY = 'yes' ]; then          ln -s __init__.py.celery.sample __init__.py      else          ln -s __init__.py.base.sample __init__.py @@ -302,11 +304,11 @@ EOF      echo $CELERY_CONF >> "$INSTANCE/local_settings.py" -    if [ -v $USE_CELERY ]; then +    if [ $USE_CELERY = 'yes' ]; then          echo "USE_BACKGROUND_TASK = True" >> "$INSTANCE/local_settings.py"      fi -    if [ -v $USE_LIBREOFFICE ]; then +    if [ $USE_LIBREOFFICE = 'yes' ]; then          echo "USE_LIBREOFFICE = True" >> "$INSTANCE/local_settings.py"      fi @@ -381,7 +383,7 @@ EOF      ### Celery - start worker -    if [ -v $USE_CELERY ]; then +    if [ $USE_CELERY = 'yes' ]; then          systemctl enable celery-$INSTANCE          systemctl start celery-$INSTANCE      fi @@ -416,7 +418,7 @@ EOF      echo "  And then enjoy ishtar!"      echo "" -    if [ -v $USE_CELERY ]; then +    if [ $USE_CELERY = 'yes' ]; then          cat >&2 <<-'EOF'      If you use monit a configuration file has been generated for the celery | 
