mirror of
https://github.com/YunoHost-Apps/ampache_ynh.git
synced 2024-09-03 18:15:55 +02:00
52 lines
1.3 KiB
Bash
52 lines
1.3 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)
|
|
|
|
final_path=/var/www/$app
|
|
|
|
#=================================================
|
|
# REMOVE THE MYSQL DATABASE
|
|
#=================================================
|
|
|
|
ynh_mysql_drop_db $app
|
|
ynh_mysql_drop_user $app
|
|
|
|
#=================================================
|
|
# REMOVE APP MAIN DIR
|
|
#=================================================
|
|
|
|
# Remove sources
|
|
ynh_secure_remove $final_path
|
|
|
|
#=================================================
|
|
# REMOVE NGINX CONFIGURATION
|
|
#=================================================
|
|
|
|
# Remove Nginx configuration and reload Nginx conf
|
|
ynh_secure_remove /etc/nginx/conf.d/$domain.d/$app.conf
|
|
|
|
#=================================================
|
|
# REMOVE DEPENDENCIES
|
|
#=================================================
|
|
|
|
# Remove dependency
|
|
ynh_remove_dependencies libav-tools
|
|
|
|
#=================================================
|
|
# RELOAD NGINX
|
|
#=================================================
|
|
|
|
systemctl reload nginx
|