1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/UMS_ynh.git synced 2024-10-01 13:35:01 +02:00

Merge pull request #11 from YunoHost-Apps/testing

Correct open port
This commit is contained in:
Krakinou 2021-05-11 23:02:52 +02:00 committed by GitHub
commit 929a3dbf13
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View file

@ -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
#=================================================

View file

@ -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
#=================================================