1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/hubzilla_ynh.git synced 2024-09-03 19:26:21 +02:00
hubzilla_ynh/scripts/remove

42 lines
1.1 KiB
Text
Raw Normal View History

#!/bin/bash
source .fonctions # Charge les fonctions génériques habituellement utilisées dans le script
# Récupère les infos de l'application.
app=$YNH_APP_INSTANCE_NAME
# Source app helpers
source /usr/share/yunohost/helpers
domain=$(ynh_app_setting_get $app domain)
db_user=$(ynh_app_setting_get $app db_user)
run_exec=$(ynh_app_setting_get $app run_exec)
REMOVE_BDD $db_user # Suppression de la base de donnée et de l'utilisateur associé.
SECURE_REMOVE '/var/www/$app' # Suppression du dossier de l'application
REMOVE_NGINX_CONF # Suppression de la configuration nginx
REMOVE_FPM_CONF # Suppression de la configuration du pool php-fpm
# Remove poller cron job
sudo rm -f /etc/cron.d/$app
2017-02-17 21:57:47 +01:00
# Restore php.ini as it was before installing hubzilla
if [ "$run_exec" = "Yes" ];
then
sudo sed -i 's/,,/,pcntl_exec,/g' /etc/php5/fpm/php.ini
else
echo "no modification of php.ini"
fi
# Reload services after cleaning
sudo service php5-fpm reload
sudo service nginx reload
# Régénère la configuration de SSOwat
sudo yunohost app ssowatconf
echo -e "\e[0m" # Restore normal color