mirror of
https://github.com/YunoHost-Apps/ihatemoney_ynh.git
synced 2024-09-03 19:26:15 +02:00
[ehn] Use MySQL drop helpers
This commit is contained in:
parent
2c7cb29974
commit
546581d642
2 changed files with 4 additions and 3 deletions
|
@ -41,8 +41,8 @@ ynh_app_setting_set $app mysqlpwd $db_pwd
|
||||||
function exit_properly
|
function exit_properly
|
||||||
{
|
{
|
||||||
set +e
|
set +e
|
||||||
root_pwd=$(sudo cat /etc/yunohost/mysql)
|
ynh_mysql_drop_db $db_name
|
||||||
mysql -u root -p$root_pwd -e "DROP DATABASE $db_name ; DROP USER $db_user ;"
|
ynh_mysql_drop_user $db_user
|
||||||
sudo userdel ihatemoney
|
sudo userdel ihatemoney
|
||||||
sudo rm -Rf /opt/yunohost/ihatemoney
|
sudo rm -Rf /opt/yunohost/ihatemoney
|
||||||
sudo rm -Rf /etc/ihatemoney
|
sudo rm -Rf /etc/ihatemoney
|
||||||
|
|
|
@ -15,7 +15,8 @@ db_name=$app
|
||||||
root_pwd=$(sudo cat /etc/yunohost/mysql)
|
root_pwd=$(sudo cat /etc/yunohost/mysql)
|
||||||
|
|
||||||
# Drop database
|
# 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
|
# Remove src
|
||||||
sudo rm -rf /opt/yunohost/ihatemoney/
|
sudo rm -rf /opt/yunohost/ihatemoney/
|
||||||
|
|
Loading…
Reference in a new issue