1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/adguardhome_ynh.git synced 2024-09-03 18:06:23 +02:00

rework dot and doq ports attributions

This commit is contained in:
OniriCorpe 2023-12-26 16:54:42 +01:00
parent 41f9785fba
commit 5b8e6276e0

View file

@ -29,18 +29,22 @@ ynh_systemd_action --service_name="$app" --action="stop"
#================================================= #=================================================
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
if [ -z "$adguard_dot_port" ] || [ -z "$adguard_doq_port" ];
then
# DNS over TLS
adguard_dot_port=853
ynh_app_setting_set --app=$app --key=adguard_dot_port --value=$adguard_dot_port
# DNS over QUIC
adguard_doq_port=784
ynh_app_setting_set --app="$app" --key=adguard_doq_port --value=$adguard_doq_port
fi
if [ -n "$dns_over_https" ] && [ "$dns_over_https" == "1" ]; if [ -n "$dns_over_https" ] && [ "$dns_over_https" == "1" ];
then then
dns_over_https="true" dns_over_https="true"
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
# DNS over TLS
adguard_dot_port=853
ynh_app_setting_set --app=$app --key=adguard_dot_port --value=$adguard_dot_port
ynh_exec_warn_less yunohost firewall allow --no-upnp UDP $adguard_dot_port ynh_exec_warn_less yunohost firewall allow --no-upnp UDP $adguard_dot_port
ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $adguard_dot_port ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $adguard_dot_port
# DNS over QUIC
adguard_doq_port=784
ynh_app_setting_set --app="$app" --key=adguard_doq_port --value=$adguard_doq_port
ynh_exec_warn_less yunohost firewall allow --no-upnp UDP $adguard_doq_port ynh_exec_warn_less yunohost firewall allow --no-upnp UDP $adguard_doq_port
elif [ -z "$dns_over_https" ] || [ "$dns_over_https" == "0" ]; elif [ -z "$dns_over_https" ] || [ "$dns_over_https" == "0" ];
then then