#!/bin/bash source _common.sh source /usr/share/yunohost/helpers #================================================= # REMOVE SYSTEM CONFIGURATIONS #================================================= # REMOVE SYSTEMD SERVICE #================================================= ynh_script_progression "Removing system configurations related to $app..." # Remove the dedicated NGINX config ynh_config_remove_nginx # Remove the dedicated PHP-FPM config ynh_config_remove_phpfpm # Remove the app-specific logrotate config ynh_config_remove_logrotate # Remove the dedicated Fail2Ban config ynh_config_remove_fail2ban # Remove a cron file # TODO: Ensure that cron job is not running (How !?) ynh_safe_rm "/etc/cron.d/$app" # Cleaning ACL in home directories for i in $(ls /home); do # Clean ACL in every directories in /home, except those which start with 'yunohost.' [[ ! $i == yunohost.* ]] \ && setfacl --remove g:$app:rwx 2>&1 done #================================================= # END OF SCRIPT #================================================= ynh_script_progression "Removal of $app completed"