Change to -i, interface

This commit is contained in:
DL6ER 2017-03-01 10:59:55 +01:00
parent 721ada7e16
commit 01273124ea
No known key found for this signature in database
GPG key ID: 00135ACBD90B28DD

View file

@ -27,11 +27,11 @@ helpFunc() {
::: -f, fahrenheit Set Fahrenheit temperature unit
::: -k, kelvin Set Kelvin temperature unit
::: -h, --help Show this help dialog
::: listening Setup interface listening behavior of dnsmasq
::: pihole -a listening allinterfaces : Listen on all interfaces, permit all origins
::: pihole -a listening gravityinterface : Listen only on one interface (see PIHOLE_INTERFACE)
::: pihole -a listening localsubnets : Listen on all interfaces, but allow only queries from
::: devices that are at most one hop away (local devices)
::: -i, interface Setup interface listening behavior of dnsmasq
::: pihole -a -i all : Listen on all interfaces, permit all origins
::: pihole -a -i single : Listen only on one interface (see PIHOLE_INTERFACE)
::: pihole -a -i local : Listen on all interfaces, but allow only queries from
::: devices that are at most one hop away (local devices)
EOM
exit 0
}
@ -142,11 +142,11 @@ trust-anchor=.,19036,8,2,49AAC11D7B6F6446702E54A1607371607A1A41855200FD2CE1CDDE3
delete_dnsmasq_setting "interface"
delete_dnsmasq_setting "local-service"
if [[ "${DNSMASQ_LISTENING}" == "allinterfaces" ]]; then
if [[ "${DNSMASQ_LISTENING}" == "all" ]]; then
# Listen on all interfaces, permit all origins
# Leave a comment in 01-pihole.conf
add_dnsmasq_setting "# Listening on all interfaces"
elif [[ "${DNSMASQ_LISTENING}" == "gravityinterface" ]]; then
elif [[ "${DNSMASQ_LISTENING}" == "single" ]]; then
# Listen only on one interface
add_dnsmasq_setting "interface" "${PIHOLE_INTERFACE}"
else
@ -390,10 +390,10 @@ SetListeningMode(){
source "${setupVars}"
if [[ "${args[2]}" == "allinterfaces" ]] ; then
echo "Listening on all interfaces, permiting all origins"
if [[ "${args[2]}" == "all" ]] ; then
echo "Listening on all interfaces, permiting all origins, hope you have a firewall!"
change_setting "DNSMASQ_LISTENING" "allinterfaces"
elif [[ "${args[2]}" == "gravityinterface" ]] ; then
elif [[ "${args[2]}" == "single" ]] ; then
echo "Listening only on interface ${PIHOLE_INTERFACE}"
change_setting "DNSMASQ_LISTENING" "gravityinterface"
else
@ -427,7 +427,7 @@ main() {
"addstaticdhcp" ) AddDHCPStaticAddress;;
"removestaticdhcp" ) RemoveDHCPStaticAddress;;
"hostrecord" ) SetHostRecord;;
"listening" ) SetListeningMode;;
"-i" | "interface" ) SetListeningMode;;
* ) helpFunc;;
esac