1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/rportd_ynh.git synced 2024-09-03 20:16:15 +02:00
This commit is contained in:
chris0688 2022-07-11 22:22:24 +02:00 committed by GitHub
commit ed17f01a2a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 4 deletions

View file

@ -39,7 +39,25 @@
{
"name": "password",
"type": "password"
}
},
{
"name": "firstport",
"type": "number",
"ask": {
"en": "Enter the FIRST Port that should be used by Rport eg. port for tunnels (standard 20000)",
"de": "Bitte geben Sie den ERSTEN Port ein, welcher von Rport für z.B. die Tunnels genutzt wird (Standard 20000)"
},
"example": "20000"
},
{
"name": "lastport",
"type": "number",
"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 (Standard 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