diff --git a/scripts/install b/scripts/install index caf57a7..e7177a6 100755 --- a/scripts/install +++ b/scripts/install @@ -41,8 +41,8 @@ ynh_app_setting_set $app mysqlpwd $db_pwd function exit_properly { set +e - root_pwd=$(sudo cat /etc/yunohost/mysql) - mysql -u root -p$root_pwd -e "DROP DATABASE $db_name ; DROP USER $db_user ;" + ynh_mysql_drop_db $db_name + ynh_mysql_drop_user $db_user sudo userdel ihatemoney sudo rm -Rf /opt/yunohost/ihatemoney sudo rm -Rf /etc/ihatemoney diff --git a/scripts/remove b/scripts/remove index 41d4af9..e7c94a4 100755 --- a/scripts/remove +++ b/scripts/remove @@ -15,7 +15,8 @@ db_name=$app root_pwd=$(sudo cat /etc/yunohost/mysql) # Drop database -mysql -u root -p$root_pwd -e "DROP DATABASE $db_name ; DROP USER $db_user@localhost ;" +ynh_mysql_drop_db $db_name +ynh_mysql_drop_user $db_user # Remove src sudo rm -rf /opt/yunohost/ihatemoney/