From 7af8d4b5a56bbb5d48ebf1087bc8cc2bd6cf426a Mon Sep 17 00:00:00 2001 From: frju365 <19982894+frju365@users.noreply.github.com> Date: Sun, 10 Jun 2018 03:11:26 +0200 Subject: [PATCH] Update remove --- scripts/remove | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/remove b/scripts/remove index 9f2f483..373b6c3 100644 --- a/scripts/remove +++ b/scripts/remove @@ -14,6 +14,8 @@ source /usr/share/yunohost/helpers #================================================= app=$YNH_APP_INSTANCE_NAME +db_name=$(ynh_app_setting_get $app db_name) +db_user=$db_name final_path=$(ynh_app_setting_get $app final_path) port=$(ynh_app_setting_get $app port) domain=$(ynh_app_setting_get $app domain) @@ -37,6 +39,13 @@ then yunohost service remove $app fi +#================================================= +# REMOVE THE MYSQL DATABASE +#================================================= + +# Remove a database if it exists, along with the associated user +ynh_mysql_remove_db $db_user $db_name + #================================================= # REMOVE APP MAIN DIR #=================================================