diff --git a/actions.toml b/actions.toml index fc7f8aa..71fd449 100644 --- a/actions.toml +++ b/actions.toml @@ -16,16 +16,6 @@ command = "/bin/bash scripts/actions/reset_default_config \"pihole-FTL.conf\"" accepted_return_codes = [0] description = "Reset the config file pihole-FTL.conf." -[reset_default_dnsmasq] -name = "Reset the config file and restore a default one." -command = "/bin/bash scripts/actions/reset_default_config \"01-pihole.conf\"" -# user = "root" # optional -# cwd = "/" # optional -# accepted_return_codes = [0, 1, 2, 3] # optional -accepted_return_codes = [0] -description = "Reset the config file dnsmasq.d/01-pihole.conf." - - [reset_default_nginx] name = "Reset the nginx config for this app." command = "/bin/bash scripts/actions/reset_default_system nginx" diff --git a/scripts/actions/reset_default_config b/scripts/actions/reset_default_config index fcec8b7..c3b6fe4 100755 --- a/scripts/actions/reset_default_config +++ b/scripts/actions/reset_default_config @@ -34,8 +34,6 @@ if [ "$file" = "setupVars.conf" ]; then config_file="/etc/pihole/setupVars.conf" elif [ "$file" = "pihole-FTL.conf" ]; then config_file="/etc/pihole/pihole-FTL.conf" -elif [ "$file" = "01-pihole.conf" ]; then - config_file="/etc/dnsmasq.d/01-pihole.conf" fi #================================================= @@ -77,27 +75,6 @@ then # Restart pihole-FTL ynh_systemd_action --action=restart --service_name=pihole-FTL - -elif [ "$file" = "01-pihole.conf" ] -then - cp "$pihole_local_repo/advanced/01-pihole.conf" $config_file - # Use dns from /etc/resolv.dnsmasq.conf - ynh_replace_string --match_string="@DNS1@" --replace_string="" --target_file=$config_file - ynh_replace_string --match_string="@DNS2@" --replace_string="" --target_file=$config_file - ynh_replace_string --match_string="^no-resolv" --replace_string="#no-resolv" --target_file=$config_file - - ynh_replace_string --match_string="@INT@" --replace_string="$main_iface" --target_file=$config_file - if [ "$query_logging" = "true" ]; then - ynh_replace_string --match_string="^#log-queries" --replace_string="log-queries" --target_file=$config_file - else - ynh_replace_string --match_string="^log-queries" --replace_string="#log-queries" --target_file=$config_file - fi - - # Fix a too recent option for our dnsmasq version. - ynh_replace_string --match_string="log-queries=extra" --replace_string="log-queries" --target_file=$config_file - - # To prevent any conflict with the original dnsmasq config, comment cache-size in the original config. - ynh_replace_string --match_string="^cache-size=" --replace_string="#pihole# cache-size=" --target_file=/etc/dnsmasq.conf fi # Calculate and store the config file checksum into the app settings