mirror of
https://github.com/YunoHost-Apps/pihole_ynh.git
synced 2024-09-03 20:05:58 +02:00
remove action for dnsmasq
This commit is contained in:
parent
ff32be711d
commit
faf8991522
2 changed files with 0 additions and 33 deletions
10
actions.toml
10
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"
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue