From 546ef53e07cb809060379ad5adccb731719e372e Mon Sep 17 00:00:00 2001 From: Yalh Date: Sat, 26 Jan 2019 21:38:57 +0100 Subject: [PATCH] Fix port opening not needed --- manifest.json | 2 +- scripts/install | 2 +- scripts/upgrade | 10 ++++++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index a1f165d..077e58f 100755 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Pleroma is an OStatus-compatible social networking server written in Elixir, compatible with GNU Social and Mastodon", "fr": "Pleroma est un réseau social écrit en Elixir, compatible avec OStatus, GNU Social et Mastodon" }, - "version": "0.9.0~ynh1", + "version": "0.9.0~ynh2", "url": "https://git.pleroma.social/pleroma/pleroma", "license": "AGPL-3.0-only", "maintainer": { diff --git a/scripts/install b/scripts/install index 312b2ab..59ba02c 100755 --- a/scripts/install +++ b/scripts/install @@ -95,7 +95,7 @@ ynh_app_setting_set "$app" random_key "$random_key" # Find a free port port=$(ynh_find_port 4000) # 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 #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 88ed856..e02689b 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -218,6 +218,16 @@ ynh_backup_if_checksum_is_different "$final_path/$app/config/prod.secret.exs" # Recalculate and store the checksum of the file for the next upgrade. ynh_store_file_checksum "$final_path/$app/config/prod.secret.exs" +#================================================= +# 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 #=================================================