From ba823c8906ad8eeab06eaa4c97728128701dfe50 Mon Sep 17 00:00:00 2001 From: polytan02 Date: Fri, 24 Feb 2017 19:30:52 +0000 Subject: [PATCH] Clean mysql database removal --- scripts/install | 2 +- scripts/remove | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index d07fcca..41072e6 100644 --- a/scripts/install +++ b/scripts/install @@ -48,7 +48,7 @@ dbname=$app dbuser=$app dbpass=$(ynh_string_random) ynh_mysql_create_db "$dbname" "$dbuser" "$dbpass" -ynh_app_setting_set "$app" dbuser "$dbuser" +ynh_app_setting_set "$app" dbname "$dbname" ynh_app_setting_set "$app" dbpass "$dbpass" # Store the database access diff --git a/scripts/remove b/scripts/remove index 002eb0a..d4554dc 100644 --- a/scripts/remove +++ b/scripts/remove @@ -7,11 +7,12 @@ source /usr/share/yunohost/helpers source .fonctions domain=$(ynh_app_setting_get $app domain) +dbname=$(ynh_app_setting_get $app dbname) -ynh_mysql_drop_db $app +REMOVE_BDD "$dname" # Remove installed files -SECURE_REMOVE '/var/www/$app' +SECURE_REMOVE '/var/www/${app}' REMOVE_NGINX_CONF REMOVE_FPM_CONF