mirror of
https://github.com/YunoHost-Apps/ampache_ynh.git
synced 2024-09-03 18:15:55 +02:00
17 lines
436 B
Bash
17 lines
436 B
Bash
#!/bin/bash
|
|
|
|
app=$YNH_APP_INSTANCE_NAME
|
|
db_user=$app
|
|
db_name=$app
|
|
root_pwd=$(sudo cat /etc/yunohost/mysql)
|
|
domain=$(sudo yunohost app setting $app domain)
|
|
|
|
# Drop MySQL database
|
|
mysql -u root -p$root_pwd -e "DROP DATABASE $db_name ; DROP USER $db_user@localhost ;"
|
|
|
|
# Remove sources
|
|
sudo rm -rf /var/www/$app
|
|
|
|
# Remove Nginx configuration and reload Nginx conf
|
|
sudo rm -f /etc/nginx/conf.d/$domain.d/$app.conf
|
|
sudo service nginx reload
|