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

add manual port change at install

add the feature to change the portrange for tunnels manual on install
This commit is contained in:
chris0688 2022-07-11 19:47:01 +02:00
parent b467e47b0b
commit f9a4bd40d8
2 changed files with 20 additions and 2 deletions

View file

@ -40,6 +40,24 @@
"name": "password",
"type": "password"
}
{
"name": "first port"
"type": "firstport"
"ask": {
"en": "Enter the FIRST Port that should be used by Rport eg. port for tunnels (standard 20000)""
"de": "Bitte geben Sie den LETZEN Port ein welcher von Rport für z.B. die Tunnels genutzt wird (Standart 20000)"
},
"example": "20000"
},
{
"name": "last port"
"type": "lastport"
"ask": {
"en": "Enter the LAST Port that should be used by Rport eg. port for tunnels (standard 30000)""
"de": "Bitte geben Sie den LETZEN Port ein welcher von Rport für z.B. die Tunnels genutzt wird (Standart 30000)"
},
"example": "30000"
}
]
}
}

View file

@ -76,9 +76,9 @@ ynh_app_setting_set --app=$app --key=api_port --value=$api_port
guacd_port=$(ynh_find_port --port=$(($api_port + 1)))
ynh_app_setting_set --app=$app --key=guacd_port --value=$guacd_port
used_start_port=$(ynh_find_port --port=20000)
used_start_port=$YNH_APP_ARG_FIRSTPORT
ynh_app_setting_set --app=$app --key=used_start_port --value=$used_start_port
used_end_port=$(ynh_find_port --port=30000)
used_end_port=$YNH_APP_ARG_LASTPORT
ynh_app_setting_set --app=$app --key=used_end_port --value=$used_end_port
ynh_exec_warn_less yunohost firewall allow TCP $used_start_port:$used_end_port