From da967144d6bf640cfe9001ca8edc43b4721dd0a0 Mon Sep 17 00:00:00 2001 From: Yalh Date: Sat, 26 Jan 2019 21:10:23 +0100 Subject: [PATCH 1/3] Desactivate port opening --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index a526990..3781c0e 100755 --- a/scripts/install +++ b/scripts/install @@ -108,7 +108,7 @@ ynh_app_setting_set $app local_timeline $local_timeline # Find a free port port=$(ynh_find_port 8095) # Open this port -yunohost firewall allow --no-upnp TCP $port 2>&1 +#yunohost firewall allow --no-upnp TCP $port 2>&1 ynh_app_setting_set $app port $port #================================================= From 5a8e0189699b0f741ea07ae25e1fbe2de4d0df5f Mon Sep 17 00:00:00 2001 From: Yalh Date: Sat, 26 Jan 2019 21:24:34 +0100 Subject: [PATCH 2/3] Closing port on upgrade --- scripts/upgrade | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index d768eb9..417d0fb 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -122,6 +122,18 @@ ynh_backup_if_checksum_is_different "$final_path/config.ini" # Recalculate and store the checksum of the file for the next upgrade. ynh_store_file_checksum "$final_path/config.ini" + +#================================================= +# CLOSE A PORT +#================================================= + +if yunohost firewall list | grep -q "\- $port$" +then + echo "Close port $port" >&2 + yunohost firewall disallow TCP $port 2>&1 +fi + + #================================================= # SETUP LOGROTATE #================================================= From e2431252c526456cdac5a10f529f25cd38e0104b Mon Sep 17 00:00:00 2001 From: Yalh Date: Sat, 26 Jan 2019 21:25:05 +0100 Subject: [PATCH 3/3] Fix port opening --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 6932ced..872da58 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Write Freely is free and open source software for starting a minimalist, federated blog — or an entire community.", "fr": "Write Freely est un logiciel gratuit et à code source ouvert permettant de créer un blog fédéré minimaliste ou une communauté entière." }, - "version": "0.8.0~ynh1", + "version": "0.8.0~ynh2", "url": "https://writefreely.org", "license": "free", "maintainer": {