From 5042dbb349a0a21d830a197b37a68c5bdc82d66b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9rard=20Collin?= Date: Fri, 13 Jan 2023 08:53:44 +0100 Subject: [PATCH] Forgot to remove sudoers file --- scripts/remove | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/remove b/scripts/remove index 21778b0..78464db 100755 --- a/scripts/remove +++ b/scripts/remove @@ -27,6 +27,7 @@ db_user=$(ynh_app_setting_get --app=$app --key=db_user) final_path=$(ynh_app_setting_get --app=$app --key=final_path) html_path=$(ynh_app_setting_get --app=$app --key=html_path) document_path=$(ynh_app_setting_get --app=$app --key=document_path) +public_key=$(ynh_app_setting_get --app=$app --key=public_key) PORT_LIST=($port_ide $port_preview $port_project $port_data) @@ -135,6 +136,13 @@ ynh_script_progression --message="Removing various files..." --weight=1 # Remove the log files ynh_secure_remove --file="/var/log/$app" +if [ -n "$public_key" ] +then + ynh_script_progression --message="Removing ssh dev access" --weight=1 + ynh_secure_remove --file="/etc/sudoers.d/$app-sudoers" + +fi + #================================================= # GENERIC FINALIZATION #=================================================