mirror of
https://github.com/YunoHost-Apps/wireguard_ynh.git
synced 2024-09-03 20:35:58 +02:00
Better detection of ports conflict
This commit is contained in:
parent
079b888683
commit
e811a176d5
1 changed files with 3 additions and 3 deletions
|
@ -39,11 +39,11 @@ if [ -z "$final_path" ]; then
|
||||||
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Change port for WireGuard UI because 8095 is default port for WireGuard VPN
|
# Change port if WireGuard port is the same as WireGuard UI's
|
||||||
if [ $port -eq 8095 ]
|
if [ $port -eq $port_wg ]
|
||||||
then
|
then
|
||||||
ynh_app_setting_delete --app=$app --key=port
|
ynh_app_setting_delete --app=$app --key=port
|
||||||
port=$(ynh_find_port --port=8096)
|
port=$(ynh_find_port --port=$(($port_wg+1)))
|
||||||
ynh_app_setting_set --app=$app --key=port --value=$port
|
ynh_app_setting_set --app=$app --key=port --value=$port
|
||||||
ynh_app_setting_set --app=$app --key=is_public --value=0
|
ynh_app_setting_set --app=$app --key=is_public --value=0
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue