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

25 lines
659 B
Text
Raw Normal View History

2015-11-11 18:03:16 +01:00
#!/bin/bash
2017-03-02 15:44:54 +01:00
# Exit on command errors and treat unset variables as an error
set -u
2015-11-11 18:03:16 +01:00
2017-03-08 00:50:23 +01:00
source .fonctions # Loads the generic functions usually used in the script
source /usr/share/yunohost/helpers # Source app helpers
2015-11-11 18:03:16 +01:00
2017-03-08 00:50:23 +01:00
# Retrieves application info.
2017-03-02 15:44:54 +01:00
app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get $app domain)
2017-03-08 00:50:23 +01:00
REMOVE_BDD $app # Deleting the database and the associated user.
2017-03-02 15:44:54 +01:00
SECURE_REMOVE '/var/www/$app' # Removing the application folder
2017-03-02 15:44:54 +01:00
2017-03-08 00:50:23 +01:00
REMOVE_NGINX_CONF # Deleting the nginx configuration
2017-03-02 15:44:54 +01:00
2017-03-08 00:50:23 +01:00
REMOVE_FPM_CONF # Deleting the php-fpm pool configuration
2017-03-02 15:44:54 +01:00
2017-03-08 00:50:23 +01:00
# Reload SSOwat configuration
2017-03-02 15:44:54 +01:00
sudo yunohost app ssowatconf
echo -e "\e[0m" # Restore normal color