1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/rss-bridge_ynh.git synced 2024-09-03 20:25:51 +02:00
rss-bridge_ynh/scripts/remove

51 lines
1.5 KiB
Text
Raw Normal View History

2017-04-26 19:01:53 +02:00
#!/bin/bash
# Treat unset variables as an error
set -u
#=================================================
# GENERIC STARTING
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# LOAD SETTINGS
#=================================================
app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get $app domain)
db_name=$(ynh_app_setting_get $app db_name)
domain=$(ynh_app_setting_get "$app" domain)
#=================================================
# STANDARD REMOVE
#=================================================
#=================================================
# REMOVE APP MAIN DIR
#=================================================
ynh_secure_remove "/var/www/$app"
#=================================================
# REMOVE NGINX AND PHP-FPM CONFIGURATION
#=================================================
# Delete app directory and configurations
2019-05-24 04:56:16 +02:00
sudo ynh_secure_remove --file="/var/www/${app}"
sudo ynh_secure_remove --file="/etc/php5/fpm/pool.d/${app}.conf"
[[ -n $domain ]] && sudo ynh_secure_remove --file="/etc/nginx/conf.d/${domain}.d/${app}.conf"
2017-04-26 19:01:53 +02:00
# Reload services
sudo systemctl restart php5-fpm
sudo systemctl reload nginx
#=================================================
# REMOVE DEDICATED USER
#=================================================
2019-05-24 04:56:16 +02:00
ynh_system_user_delete $app