#!/usr/bin/env sh
PATH=/opt/remi/php56/root/usr/bin/:$PATH

if [ -f /var/www/corpusdelaparole/corpus-back/artisan ]; then
    pushd /var/www/corpusdelaparole/corpus-back/ > /dev/null

    echo "Put back application in maintenance"
    php artisan down

    popd > /dev/null
fi


if [ -x /usr/local/bin/drush ]; then
    echo "Deactivate corpus module"
    /usr/local/bin/drush -r /var/www/corpusdelaparole/drupal pm-disable -y corpus
fi
