diff --git a/scripts/remove b/scripts/remove index 65e1e6c..1b9bef9 100755 --- a/scripts/remove +++ b/scripts/remove @@ -17,6 +17,7 @@ ynh_script_progression --message="Loading installation settings..." --weight=4 app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) +mpd_port=$(ynh_app_setting_get --app=$app --key=mpd_port) port=$(ynh_app_setting_get --app=$app --key=port) final_path=$(ynh_app_setting_get --app=$app --key=final_path) @@ -67,6 +68,15 @@ ynh_script_progression --message="Removing NGINX web server configuration..." -- # Remove the dedicated NGINX config ynh_remove_nginx_config +#================================================= +# CLOSE A PORT +#================================================= + +if yunohost firewall list | grep -q "\- $mpd_port$" +then + ynh_script_progression --message="Closing port $mpd_port..." --time --weight=1 + ynh_exec_warn_less yunohost firewall disallow TCP $mpd_port +fi #================================================= # SPECIFIC REMOVE #=================================================