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
|
|
|
|
2017-03-10 20:36:07 +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
|
|
|
|
|
2017-03-10 20:36:07 +01:00
|
|
|
echo -e "\e[0m" # Restore normal color
|