From fdbec699f369cc455c565aabb5feea1513ed9b36 Mon Sep 17 00:00:00 2001 From: siwinter <45730097+siwinter@users.noreply.github.com> Date: Tue, 24 Aug 2021 13:05:15 +0200 Subject: [PATCH] MPD extension --- scripts/remove | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 #=================================================