1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/wordpress_ynh.git synced 2024-09-03 20:36:10 +02:00
wordpress_ynh/scripts/remove
Maniack Crudelis 11eeb9a401 _common.sh
2017-03-20 17:39:35 +01:00

59 lines
1.7 KiB
Bash
Executable file

#!/bin/bash
#=================================================
# GENERIC STARTING
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# LOAD SETTINGS
#=================================================
app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get $app domain)
db_name=$(ynh_app_setting_get $app db_name)
#=================================================
# STANDARD REMOVE
#=================================================
# REMOVE DEPENDENCIES
#=================================================
ynh_remove_app_dependencies
#=================================================
# REMOVE THE SQL BDD
#=================================================
ynh_mysql_remove_db $db_name $db_name # Suppression de la base de donnée et de l'utilisateur associé.
#=================================================
# REMOVE THE MAIN DIR OF THE APP
#=================================================
SECURE_REMOVE '/var/www/$app' # Suppression du dossier de l'application
#=================================================
# REMOVE THE NGINX CONFIGURATION
#=================================================
REMOVE_NGINX_CONF # Suppression de la configuration nginx
#=================================================
# REMOVE THE PHP-FPM CONFIGURATION
#=================================================
REMOVE_FPM_CONF # Suppression de la configuration du pool php-fpm
#=================================================
# GENERIC FINALISATION
#=================================================
# REMOVE DEDICATED USER
#=================================================
ynh_system_user_delete $app