1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/calibreweb_ynh.git synced 2024-09-03 18:16:20 +02:00

remove opening of port 8083

This commit is contained in:
Krakinou 2020-09-20 17:43:10 +02:00
parent 7a13f62fef
commit 9de482b23a
4 changed files with 9 additions and 5 deletions

View file

@ -1,2 +0,0 @@
eclipse.preferences.version=1
encoding//conf/generate_password_hash.py=utf-8

View file

@ -72,8 +72,7 @@ ynh_app_setting_set $app is_public $is_public
# Find a free port
port=$(ynh_find_port 8083)
# Open this port
ynh_script_progression --message="Opening port $port..." --weight=5
ynh_script_progression --message="Setting port $port..." --weight=5
ynh_app_setting_set $app port $port
#=================================================

View file

@ -51,7 +51,6 @@ ynh_restore_file "/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
ynh_script_progression --message="reopening port $port..." --weight=5
yunohost firewall allow --no-upnp TCP $port 2>&1
ynh_app_setting_set $app port $port
#=================================================

View file

@ -56,6 +56,14 @@ else #on est encore en 0.6.0
current_upstream_app_version='0.6.0'
fi
#Close unwanted open port in firewall
if yunohost firewall list | grep -q "\- $port$"
then
ynh_script_progression --message="Closing port $port..." --weight=10
yunohost firewall disallow TCP $port 2>&1
fi
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================