1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/shaarli_ynh.git synced 2024-09-03 20:26:10 +02:00
shaarli_ynh/scripts/remove

70 lines
1.8 KiB
Text
Raw Normal View History

2013-12-19 03:02:51 +01:00
#!/bin/bash
2018-06-25 05:57:41 +02:00
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# LOAD SETTINGS
#=================================================
2017-02-26 18:10:35 +01:00
app=$YNH_APP_INSTANCE_NAME
2013-12-29 19:55:11 +01:00
2018-06-25 05:57:41 +02:00
domain=$(ynh_app_setting_get $app domain)
final_path=$(ynh_app_setting_get $app final_path)
2018-09-27 22:44:34 +02:00
#=================================================
# REMOVE DEPENDENCIES
#=================================================
# Remove metapackage and its dependencies
ynh_remove_app_dependencies
2018-06-25 05:57:41 +02:00
#=================================================
# REMOVE APP MAIN DIR
#=================================================
# Remove the app directory securely
ynh_secure_remove "$final_path"
#=================================================
# REMOVE NGINX CONFIGURATION
#=================================================
# Remove the dedicated nginx config
ynh_remove_nginx_config
#=================================================
# REMOVE PHP-FPM CONFIGURATION
#=================================================
# Remove the dedicated php-fpm config
ynh_remove_fpm_config
2017-02-26 18:10:35 +01:00
2018-09-27 22:44:34 +02:00
#=================================================
# REMOVE LOGROTATE CONFIGURATION
#=================================================
# Remove the app-specific logrotate config
ynh_remove_logrotate
#=================================================
# REMOVE FAIL2BAN CONFIGURATION
#=================================================
ynh_remove_fail2ban_config
2018-06-25 05:57:41 +02:00
#=================================================
# REMOVE DEDICATED USER
#=================================================
2017-02-26 18:10:35 +01:00
2018-06-25 05:57:41 +02:00
# Delete a system user
ynh_system_user_delete $app