1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/abantecart_ynh.git synced 2024-09-03 18:06:16 +02:00

Big Refactoring

This commit is contained in:
frju365 2018-02-11 19:47:08 +01:00 committed by GitHub
parent 4e5d0b8e8c
commit 230839d588
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,12 +1,12 @@
#!/bin/bash
#=================================================
# GENERIC STARTING
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source .fonctions
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
@ -17,40 +17,58 @@ app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get $app domain)
db_name=$(ynh_app_setting_get $app db_name)
db_user=$db_name
final_path=$(ynh_app_setting_get $app final_path)
#=================================================
# STANDARD REMOVE
#=================================================
# REMOVE THE SQL BDD
# REMOVE DEPENDENCIES
#=================================================
ynh_mysql_remove_db $db_name $db_name # Suppression de la base de donnée et de l'utilisateur associé.
# Remove metapackage and its dependencies
ynh_remove_app_dependencies
#=================================================
# REMOVE THE MAIN DIR OF THE APP
# REMOVE THE MYSQL DATABASE
#=================================================
SECURE_REMOVE '/var/www/$app' # Suppression du dossier de l'application
# Remove a database if it exists, along with the associated user
ynh_mysql_remove_db $db_user $db_name
#=================================================
# REMOVE THE NGINX CONFIGURATION
# REMOVE APP MAIN DIR
#=================================================
REMOVE_NGINX_CONF # Suppression de la configuration nginx
# Remove the app directory securely
ynh_secure_remove "$final_path"
#=================================================
# REMOVE THE PHP-FPM CONFIGURATION
# REMOVE NGINX CONFIGURATION
#=================================================
REMOVE_FPM_CONF # Suppression de la configuration du pool php-fpm
# Remove the dedicated nginx config
ynh_remove_nginx_config
#=================================================
# SPECIFIC REMOVE
#=================================================
# Remove app dependencies
# REMOVE PHP-FPM CONFIGURATION
#=================================================
if ynh_package_is_installed "abantecart-deps"; then
ynh_package_autoremove "abantecart-deps"
fi
# Remove the dedicated php-fpm config
ynh_remove_fpm_config
#=================================================
# REMOVE LOGROTATE CONFIGURATION
#=================================================
# Remove the app-specific logrotate config
ynh_remove_logrotate
#=================================================
# GENERIC FINALIZATION
#=================================================
# REMOVE DEDICATED USER
#=================================================
# Delete a system user
ynh_system_user_delete $app