mirror of
https://github.com/YunoHost-Apps/adguardhome_ynh.git
synced 2024-09-03 18:06:23 +02:00
close DoH/DoQ ports if needed
This commit is contained in:
parent
acd0d6f4a8
commit
d99bc8893d
1 changed files with 7 additions and 0 deletions
|
@ -17,8 +17,15 @@ ynh_script_progression --message="Storing installation settings..." --weight=2
|
||||||
if [ "$dns_over_https" == "1" ];
|
if [ "$dns_over_https" == "1" ];
|
||||||
then
|
then
|
||||||
dns_over_https="true"
|
dns_over_https="true"
|
||||||
|
# no need to open the ports, as they were opened at the 'Provisioning ports' step
|
||||||
else
|
else
|
||||||
dns_over_https="false"
|
dns_over_https="false"
|
||||||
|
# if dns_over_https is false, we need to close ports,
|
||||||
|
# as they were opened at the 'Provisioning ports' step
|
||||||
|
ynh_exec_warn_less yunohost firewall disallow --no-upnp TCP "$port_dns_over_http"
|
||||||
|
ynh_exec_warn_less yunohost firewall disallow --no-upnp UDP "$port_dns_over_http"
|
||||||
|
ynh_exec_warn_less yunohost firewall disallow --no-upnp UDP "$port_dns_over_quic"
|
||||||
|
ynh_exec_warn_less yunohost firewall reload
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ynh_app_setting_set --app="$app" --key=dns_over_https --value=$dns_over_https
|
ynh_app_setting_set --app="$app" --key=dns_over_https --value=$dns_over_https
|
||||||
|
|
Loading…
Add table
Reference in a new issue