mirror of
https://github.com/YunoHost-Apps/UMS_ynh.git
synced 2024-10-01 13:35:01 +02:00
commit
929a3dbf13
2 changed files with 9 additions and 1 deletions
|
@ -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
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -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
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue