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:
parent
2e4e2a86fd
commit
ea76075326
1 changed files with 13 additions and 0 deletions
|
@ -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
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue