1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/pihole_ynh.git synced 2024-09-03 20:05:58 +02:00

fix query_logging in the regenconf

This commit is contained in:
Kay0u 2021-09-14 14:48:52 +02:00
parent e68ad3f8ba
commit a09381efeb
No known key found for this signature in database
GPG key ID: AAFEEB16CFA2AE2D

View file

@ -21,15 +21,13 @@ cp -a "/etc/.pihole/advanced/01-pihole.conf" "$dnsmasq_dir/"
ynh_replace_string --match_string="@DNS1@" --replace_string="" --target_file="$dnsmasq_dir/01-pihole.conf" ynh_replace_string --match_string="@DNS1@" --replace_string="" --target_file="$dnsmasq_dir/01-pihole.conf"
ynh_replace_string --match_string="@DNS2@" --replace_string="" --target_file="$dnsmasq_dir/01-pihole.conf" ynh_replace_string --match_string="@DNS2@" --replace_string="" --target_file="$dnsmasq_dir/01-pihole.conf"
ynh_replace_string --match_string="^no-resolv" --replace_string="#no-resolv" --target_file="$dnsmasq_dir/01-pihole.conf" ynh_replace_string --match_string="^no-resolv" --replace_string="#no-resolv" --target_file="$dnsmasq_dir/01-pihole.conf"
ynh_replace_string --match_string="@INT@" --replace_string="$main_iface" --target_file="$dnsmasq_dir/01-pihole.conf" ynh_replace_string --match_string="@INT@" --replace_string="$main_iface" --target_file="$dnsmasq_dir/01-pihole.conf"
# FIXME : query_logging ain't defined query_logging=$(ynh_app_setting_get --app=$app --key=query_logging)
if [ "$query_logging" = "true" ]; then if [ "$query_logging" = "true" ]; then
ynh_replace_string --match_string="^#log-queries" --replace_string="log-queries" --target_file="$dnsmasq_dir/01-pihole.conf" ynh_replace_string --match_string="^#log-queries" --replace_string="log-queries" --target_file="$dnsmasq_dir/01-pihole.conf"
else else
ynh_replace_string --match_string="^log-queries" --replace_string="#log-queries" --target_file="$dnsmasq_dir/01-pihole.conf" ynh_replace_string --match_string="^log-queries" --replace_string="#log-queries" --target_file="$dnsmasq_dir/01-pihole.conf"
fi fi
# Fix a too recent option for our dnsmasq version. # Fix a too recent option for our dnsmasq version.
ynh_replace_string --match_string="log-queries=extra" --replace_string="log-queries" --target_file="$dnsmasq_dir/01-pihole.conf" ynh_replace_string --match_string="log-queries=extra" --replace_string="log-queries" --target_file="$dnsmasq_dir/01-pihole.conf"