mirror of
https://github.com/YunoHost-Apps/wallabag2_ynh.git
synced 2024-10-01 13:35:06 +02:00
* Readme: Add welcome UI screenshoot It's always nice to have a quick look at the UI of the software you're going to install :) * Testing (#56) * Fix 413 request entity too large (#55) * [fix] 413 Request Entity Too Large * Remove ini file for php (#57) Have a look to YunoHost-Apps/nextcloud_ynh#138 for more information * Add fail2ban config * Add Fail2ban config removal helper * Enhance fail2ban config look * Add fail2ban backup * Restore fail2ban config * Add fail2ban config during upgrade To make sure any older version will get fail2ban support * Update minimum version to 3.5 This is needed for fail2ban helpers * Add fail2ban info * Fail2ban: Fix missing log file during install * Fix feil2ban regex * Fix fail2ban regex - 2 * Use ynh_systemd_action * Use long getopts arguments * Fix duplicated comment and remove blank space * Fix fail2ban regex in upgrade script * Improve regex - install This allow empty username (not possible, but may still block some extra brute force spammers) and username with spaces * Improve regex - upgrade This allow empty username (not possible, but may still block some extra brute force spammers) and username with spaces * Fix missing log file for fail2ban * Indentation and variable usage
68 lines
1.8 KiB
Bash
68 lines
1.8 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)
|
|
domain=$(ynh_app_setting_get "$app" domain)
|
|
|
|
#=================================================
|
|
# STANDARD REMOVE
|
|
#=================================================
|
|
# REMOVE DEPENDENCIES
|
|
#=================================================
|
|
|
|
ynh_remove_app_dependencies
|
|
# The following command is kept as a matter of transition with the previous way
|
|
# of managing dependencies
|
|
ynh_package_autoremove "wallabag-deps" || true
|
|
|
|
#=================================================
|
|
# REMOVE THE MYSQL DB
|
|
#=================================================
|
|
|
|
ynh_mysql_remove_db "$app" "$db_name"
|
|
|
|
#=================================================
|
|
# REMOVE APP MAIN DIR
|
|
#=================================================
|
|
|
|
ynh_secure_remove "/var/www/$app"
|
|
|
|
#=================================================
|
|
# REMOVE NGINX AND PHP-FPM CONFIGURATION
|
|
#=================================================
|
|
|
|
ynh_remove_fpm_config
|
|
ynh_remove_nginx_config
|
|
|
|
# Reload services
|
|
systemctl restart php5-fpm
|
|
systemctl reload nginx
|
|
|
|
#=================================================
|
|
# REMOVE FAIL2BAN CONFIGURATION
|
|
#=================================================
|
|
|
|
ynh_remove_fail2ban_config
|
|
|
|
#=================================================
|
|
# REMOVE DEDICATED USER
|
|
#=================================================
|
|
|
|
ynh_system_user_delete $app
|