aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryalh76 <yalh@yahoo.com>2019-03-22 23:42:17 +0100
committeryalh76 <yalh@yahoo.com>2019-03-22 23:42:17 +0100
commit35f672269a6ca225f7dc51a81e57c8de5c9afdeb (patch)
treeadeb4b8e30f36c32e988c15ee6522fa3ba4b8f80
parente7df7cc8d71cbde6e4a74552298a83c579751163 (diff)
downloadmastodon_ynh-35f672269a6ca225f7dc51a81e57c8de5c9afdeb.tar.gz
mastodon_ynh-35f672269a6ca225f7dc51a81e57c8de5c9afdeb.tar.bz2
mastodon_ynh-35f672269a6ca225f7dc51a81e57c8de5c9afdeb.zip
move port in port step
-rw-r--r--scripts/install20
1 files changed, 15 insertions, 5 deletions
diff --git a/scripts/install b/scripts/install
index 2c12cf4..e57dbab 100644
--- a/scripts/install
+++ b/scripts/install
@@ -9,6 +9,7 @@
source _common.sh
source /usr/share/yunohost/helpers
source ynh_install_ruby
+source ynh_add_secure_repos__2
#=================================================
# MANAGE SCRIPT FAILURE
@@ -28,9 +29,6 @@ is_public=$YNH_APP_ARG_IS_PUBLIC
language=$YNH_APP_ARG_LANGUAGE
admin_mail=$(ynh_user_get_info $admin 'mail')
-port_web=$(ynh_find_port 3000)
-port_stream=$(ynh_find_port 4000)
-
app=$YNH_APP_INSTANCE_NAME
@@ -60,13 +58,25 @@ ynh_app_setting_set $app path $path_url
ynh_app_setting_set $app admin $admin
ynh_app_setting_set $app is_public $is_public
ynh_app_setting_set $app language $language
-ynh_app_setting_set $app port_web $port_web
-ynh_app_setting_set $app port_stream $port_stream
#=================================================
# STANDARD MODIFICATIONS
#=================================================
+# FIND AND OPEN A PORT
+#=================================================
+ynh_print_info "Configuring firewall..."
+### Use these lines if you have to open a port for the application
+### `ynh_find_port` will find the first available port starting from the given port.
+### If you're not using these lines:
+### - Remove the section "CLOSE A PORT" in the remove script
+
+# Find a free port
+port_web=$(ynh_find_port 3000)
+port_stream=$(ynh_find_port 4000)
+# Open this port
+ynh_app_setting_set $app port_web $port_web
+ynh_app_setting_set $app port_stream $port_stream
#=================================================
# INSTALL DEPENDENCIES