mirror of
https://github.com/YunoHost-Apps/hotspot_ynh.git
synced 2024-09-03 19:25:53 +02:00
check if nat not already set before applying nat rule
This commit is contained in:
parent
689f00983c
commit
6ef195c867
1 changed files with 3 additions and 1 deletions
|
@ -25,7 +25,9 @@ if systemctl is-active __SERVICE_NAME__; then
|
|||
unset_nat "${old_gateway_interface}"
|
||||
fi
|
||||
|
||||
set_nat "${new_gateway_interface}"
|
||||
if [[ -n "$new_gateway_interface" ]] && ! is_nat_set $new_gateway_interface; then
|
||||
set_nat "${new_gateway_interface}"
|
||||
fi
|
||||
|
||||
ynh_app_setting_set --app=__APP__ --key=gateway_interface --value="${new_gateway_interface}"
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue