diff --git a/scripts/install b/scripts/install index 0156480..be09add 100755 --- a/scripts/install +++ b/scripts/install @@ -70,7 +70,7 @@ ynh_app_setting_set --app=$app --key=port_rend --value=$port_rend # Open the port -- TO BE CHECKED IF REQUIRED ynh_script_progression --message="Configuring firewall..." --weight=3 -ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $port_web +#ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $port_web ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $port_rend #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 2428f67..d23c00b 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -109,6 +109,14 @@ ynh_system_user_create --username=$app --home_dir=/home/$app # ... #================================================= +#Close unwanted open port in firewall +if yunohost firewall list | grep -q "\- $port_web$" +then + ynh_script_progression --message="Closing port $port_web as it shouldn't be open..." + yunohost firewall disallow TCP $port_web 2>&1 +fi + + #================================================= # SETUP SYSTEMD #=================================================