1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/nextcloud_ynh.git synced 2024-09-03 19:55:57 +02:00

Add fail2ban rules in remove script

This commit is contained in:
Rafi59 2017-06-11 19:14:58 +02:00 committed by GitHub
parent cdf3fb71e8
commit 24f72965f4

View file

@ -29,9 +29,14 @@ domain=$(ynh_app_setting_get "$app" domain)
sudo rm -f "/etc/php5/fpm/pool.d/${app}.conf" sudo rm -f "/etc/php5/fpm/pool.d/${app}.conf"
[[ -n $domain ]] && sudo rm -f "/etc/nginx/conf.d/${domain}.d/${app}.conf" [[ -n $domain ]] && sudo rm -f "/etc/nginx/conf.d/${domain}.d/${app}.conf"
# Remove fail2ban rules
rm /etc/fail2ban/filter.d/nextcloud.conf
rm /etc/fail2ban/jail.d/nextcloud.local
# Reload services # Reload services
sudo service php5-fpm reload sudo service php5-fpm reload
sudo service nginx reload sudo service nginx reload
sudo fail2ban-client reload
# Remove app dependencies # Remove app dependencies
ynh_package_autoremove "$DEPS_PKG_NAME" ynh_package_autoremove "$DEPS_PKG_NAME"
@ -46,5 +51,6 @@ done
id "$app" >/dev/null 2>&1 \ id "$app" >/dev/null 2>&1 \
&& sudo deluser --quiet --remove-home "$app" >/dev/null && sudo deluser --quiet --remove-home "$app" >/dev/null
# Remove logrotate configuration # Remove logrotate configuration
ynh_remove_logrotate ynh_remove_logrotate