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 #=================================================