diff --git a/scripts/restore b/scripts/restore index 171ede0..c6bd15d 100755 --- a/scripts/restore +++ b/scripts/restore @@ -11,7 +11,7 @@ sudo cp -a $backup_dir/sources/. /var/www/$app # Restore database root_pwd=$(sudo cat /etc/yunohost/mysql) -mysql -u root -p$root_pwd -e "DROP DATABASE $app ;" +mysql -u root -p$root_pwd -e "DROP DATABASE $app ; DROP USER $app@localhost ;" db_password=$(sudo yunohost app setting $app db_password) sudo yunohost app initdb $app -p "$db_password" -s $backup_dir/dump.sql