From c84af3a6e604a274b9c75d35daf11402e47728b5 Mon Sep 17 00:00:00 2001 From: Yalh Date: Tue, 22 Jan 2019 19:38:03 +0100 Subject: [PATCH] Update remove script --- scripts/remove | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/scripts/remove b/scripts/remove index ebae61d..69d16bc 100755 --- a/scripts/remove +++ b/scripts/remove @@ -55,6 +55,13 @@ if [ -d "/usr/local/lib/rustlib" ]; then sudo /usr/local/lib/rustlib/uninstall.sh fi +#================================================= +# REMOVE THE POSTGRESQL DATABASE +#================================================= + +# Remove a database if it exists, along with the associated user +ynh_psql_remove_db "$db_name" "$app" + #================================================= # REMOVE APP MAIN DIR #================================================= @@ -70,11 +77,11 @@ ynh_secure_remove "$final_path" ynh_remove_nginx_config #================================================= -# REMOVE THE PSQL DATABASE +# REMOVE PHP-FPM CONFIGURATION #================================================= -# Remove a database if it exists, along with the associated user -ynh_psql_remove_db "$db_name" "$app" +# Remove the dedicated php-fpm config +#ynh_remove_fpm_config #================================================= # REMOVE LOGROTATE CONFIGURATION @@ -92,6 +99,20 @@ then echo "Close port $port" >&2 yunohost firewall disallow TCP $port 2>&1 fi +#================================================= +# SPECIFIC REMOVE +#================================================= +# REMOVE THE CRON FILE +#================================================= + +# Remove a cron file +#ynh_secure_remove "/etc/cron.d/$app" + +# Remove a directory securely +ynh_secure_remove "/etc/$app/" + +# Remove the log files +ynh_secure_remove "/var/log/$app/" #================================================= # GENERIC FINALIZATION