1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/nodered_ynh.git synced 2024-09-03 19:46:25 +02:00

[fix] close the port during upgrades

This commit is contained in:
tituspijean 2020-11-07 19:49:00 +01:00
parent 2e4e2a86fd
commit ea76075326

View file

@ -62,6 +62,19 @@ ynh_clean_setup () {
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
#=================================================
# CLOSING PORT
#=================================================
# In older versions of the package, the port serving the webui was opened to anyone,
# allowing direct access to Node-RED... let's close it.
if yunohost firewall list | grep -q "\- $port$"
then
ynh_script_progression --message="Closing port $port..."
ynh_exec_warn_less yunohost firewall disallow TCP $port
fi
#=================================================
# STANDARD UPGRADE STEPS
#=================================================