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

Merge pull request #12 from YunoHost-Apps/testing

Fix port opening
This commit is contained in:
yalh76 2019-01-26 21:31:13 +01:00 committed by GitHub
commit 4f2b466604
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 2 deletions

View file

@ -6,7 +6,7 @@
"en": "Write Freely is free and open source software for starting a minimalist, federated blog — or an entire community.", "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." "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", "url": "https://writefreely.org",
"license": "free", "license": "free",
"maintainer": { "maintainer": {

View file

@ -108,7 +108,7 @@ ynh_app_setting_set $app local_timeline $local_timeline
# Find a free port # Find a free port
port=$(ynh_find_port 8095) port=$(ynh_find_port 8095)
# Open this port # 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 ynh_app_setting_set $app port $port
#================================================= #=================================================

View file

@ -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. # Recalculate and store the checksum of the file for the next upgrade.
ynh_store_file_checksum "$final_path/config.ini" 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 # SETUP LOGROTATE
#================================================= #=================================================