2017-04-26 19:01:53 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#=================================================
|
2020-05-16 09:15:15 +02:00
|
|
|
# GENERIC START
|
2017-04-26 19:01:53 +02:00
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# LOAD SETTINGS
|
|
|
|
#=================================================
|
2020-05-16 09:15:15 +02:00
|
|
|
ynh_script_progression --message="Loading installation settings..." --weight=1
|
2017-04-26 19:01:53 +02:00
|
|
|
|
|
|
|
app=$YNH_APP_INSTANCE_NAME
|
|
|
|
|
2020-05-16 09:15:15 +02:00
|
|
|
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
|
|
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
2017-04-26 19:01:53 +02:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# STANDARD REMOVE
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# REMOVE APP MAIN DIR
|
|
|
|
#=================================================
|
2020-10-04 17:09:09 +02:00
|
|
|
ynh_script_progression --message="Removing RSS-Bridge main directory..." --weight=2
|
2017-04-26 19:01:53 +02:00
|
|
|
|
2020-05-16 09:15:15 +02:00
|
|
|
# Remove the app directory securely
|
|
|
|
ynh_secure_remove --file="$final_path"
|
2017-04-26 19:01:53 +02:00
|
|
|
|
|
|
|
#=================================================
|
2020-05-16 09:15:15 +02:00
|
|
|
# REMOVE NGINX CONFIGURATION
|
2017-04-26 19:01:53 +02:00
|
|
|
#=================================================
|
2020-10-04 17:09:09 +02:00
|
|
|
ynh_script_progression --message="Removing NGINX web server configuration..." --weight=2
|
2020-04-07 14:13:57 +02:00
|
|
|
|
2020-10-04 17:09:09 +02:00
|
|
|
# Remove the dedicated NGINX config
|
2020-05-16 09:15:15 +02:00
|
|
|
ynh_remove_nginx_config
|
2017-04-26 19:01:53 +02:00
|
|
|
|
2020-05-16 09:15:15 +02:00
|
|
|
#=================================================
|
|
|
|
# REMOVE PHP-FPM CONFIGURATION
|
|
|
|
#=================================================
|
2020-10-04 17:09:09 +02:00
|
|
|
ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=1
|
2017-04-26 19:01:53 +02:00
|
|
|
|
2020-10-04 17:09:09 +02:00
|
|
|
# Remove the dedicated PHP-FPM config
|
2020-05-16 09:15:15 +02:00
|
|
|
ynh_remove_fpm_config
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# GENERIC FINALIZATION
|
2017-04-26 19:01:53 +02:00
|
|
|
#=================================================
|
|
|
|
# REMOVE DEDICATED USER
|
|
|
|
#=================================================
|
2020-05-16 09:15:15 +02:00
|
|
|
ynh_script_progression --message="Removing the dedicated system user..." --weight=1
|
|
|
|
|
|
|
|
# Delete a system user
|
|
|
|
ynh_system_user_delete --username=$app
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
2017-04-26 19:01:53 +02:00
|
|
|
|
2020-10-04 17:09:09 +02:00
|
|
|
ynh_script_progression --message="Removal of RSS-Bridge completed" --last
|