1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ampache_ynh.git synced 2024-09-03 18:15:55 +02:00
ampache_ynh/scripts/remove
2017-09-25 21:53:41 +02:00

43 lines
1.1 KiB
Bash

#!/bin/bash
set -u
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
. /usr/share/yunohost/helpers
#=================================================
# LOAD SETTINGS
#=================================================
app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get $app domain)
#=================================================
# REMOVE THE MYSQL DATABASE
#=================================================
ynh_mysql_drop_db $app
ynh_mysql_drop_user $app
#=================================================
# REMOVE APP MAIN DIR
#=================================================
# Remove sources
sudo rm -rf /var/www/$app
#=================================================
# REMOVE NGINX CONFIGURATION
#=================================================
# Remove Nginx configuration and reload Nginx conf
sudo rm -f /etc/nginx/conf.d/$domain.d/$app.conf
#=================================================
# RELOAD NGINX
#=================================================
sudo service nginx reload