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
Alexandre Aubin 9765472e1a
Testing (#21)
* Upgrade to upstream version 2020-02-26

* Cleaning of the package, use more modern practices

* More tweaks to make package linter happier

Co-authored-by: Jimmy Monin <jimmy@monin.net>
2020-04-10 23:13:33 +02:00

48 lines
1.3 KiB
Bash

#!/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)
#=================================================
# STANDARD REMOVE
#=================================================
#=================================================
# REMOVE APP MAIN DIR
#=================================================
ynh_secure_remove "/var/www/$app"
#=================================================
# REMOVE NGINX AND PHP-FPM CONFIGURATION
#=================================================
ynh_secure_remove --file="/etc/php5/fpm/pool.d/${app}.conf"
ynh_secure_remove --file="/etc/nginx/conf.d/${domain}.d/${app}.conf"
# Reload services
systemctl restart php5-fpm
systemctl reload nginx
#=================================================
# REMOVE DEDICATED USER
#=================================================
ynh_system_user_delete $app