From 06db36ac27bbcf7862ed09a9e9766162f1f7aa7a Mon Sep 17 00:00:00 2001 From: anmol26s <5068843+anmol26s@users.noreply.github.com> Date: Tue, 3 Apr 2018 12:37:59 +0530 Subject: [PATCH 1/3] Removed requirement of asking the port while installation --- manifest.json | 7 ------- 1 file changed, 7 deletions(-) diff --git a/manifest.json b/manifest.json index bee9d93..08388b3 100644 --- a/manifest.json +++ b/manifest.json @@ -36,13 +36,6 @@ }, "example": "johndoe@example.com" }, - { - "name": "port", - "ask": { - "en": "Enter a port(default:9000). If the port is occupied by any other app, the installation will chose another one." - }, - "default": "9000" - }, { "name": "is_public", "type": "boolean", From 2801be3511d310123fb100a3c9fe725b911c6be4 Mon Sep 17 00:00:00 2001 From: anmol26s <5068843+anmol26s@users.noreply.github.com> Date: Tue, 3 Apr 2018 12:40:43 +0530 Subject: [PATCH 2/3] Changes for the port --- scripts/install | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index c4832e9..e608e1a 100644 --- a/scripts/install +++ b/scripts/install @@ -26,7 +26,6 @@ domain=$YNH_APP_ARG_DOMAIN path_url="/" admin_email=$YNH_APP_ARG_EMAIL admin_pass=$(ynh_string_random 24) -port=$YNH_APP_ARG_PORT is_public=$YNH_APP_ARG_IS_PUBLIC @@ -70,7 +69,7 @@ ynh_app_setting_set "$app" is_public "$is_public" #================================================= # Find a free port -ynh_find_port "$port" +port=(ynh_find_port "9000") # Open this port yunohost firewall allow Both "$port" 2>&1 ynh_app_setting_set "$app" port "$port" From 8c5e9ef20bd2c5c01626c7dafb83049a7bff27da Mon Sep 17 00:00:00 2001 From: anmol26s <5068843+anmol26s@users.noreply.github.com> Date: Tue, 3 Apr 2018 12:42:16 +0530 Subject: [PATCH 3/3] Port open while resote --- scripts/restore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/restore b/scripts/restore index 4503f16..6ef80e6 100644 --- a/scripts/restore +++ b/scripts/restore @@ -66,6 +66,9 @@ ynh_restore_file "$final_path" datadir="/home/yunohost.app/${app}/storage" ynh_restore_file "$datadir" +# Open this port +yunohost firewall allow Both "$port" 2>&1 + #================================================= # RECREATE THE DEDICATED USER #=================================================