mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
Cherry picking 3f049fa79
, conflict fix
This commit is contained in:
parent
3df2ef8587
commit
f36e4ba336
1 changed files with 17 additions and 17 deletions
34
pihole
34
pihole
|
@ -126,24 +126,24 @@ piholeEnable() {
|
||||||
}
|
}
|
||||||
|
|
||||||
piholeLogging() {
|
piholeLogging() {
|
||||||
|
shift
|
||||||
|
|
||||||
shift
|
if [[ "${1}" == "off" ]] ; then
|
||||||
|
#Disable Logging
|
||||||
if [[ "${1}" == "off" ]] ; then
|
sed -i 's/^log-queries/#log-queries/' /etc/dnsmasq.d/01-pihole.conf
|
||||||
#Disable Logging
|
sed -i 's/^QUERY_LOGGING=true/QUERY_LOGGING=false/' /etc/pihole/setupVars.conf
|
||||||
sed -i 's/^log-queries/#log-queries/' /etc/dnsmasq.d/01-pihole.conf
|
pihole -f
|
||||||
sed -i 's/^QUERY_LOGGING=true/QUERY_LOGGING=false/' /etc/pihole/setupVars.conf
|
echo "::: Logging has been disabled!"
|
||||||
echo "::: Logging has been disabled!"
|
elif [[ "${1}" == "on" ]] ; then
|
||||||
elif [[ "${1}" == "on" ]] ; then
|
#Enable logging
|
||||||
#Enable logging
|
sed -i 's/^#log-queries/log-queries/' /etc/dnsmasq.d/01-pihole.conf
|
||||||
sed -i 's/^#log-queries/log-queries/' /etc/dnsmasq.d/01-pihole.conf
|
sed -i 's/^QUERY_LOGGING=false/QUERY_LOGGING=true/' /etc/pihole/setupVars.conf
|
||||||
sed -i 's/^QUERY_LOGGING=false/QUERY_LOGGING=true/' /etc/pihole/setupVars.conf
|
echo "::: Logging has been enabled!"
|
||||||
echo "::: Logging has been enabled!"
|
else
|
||||||
else
|
echo "::: Invalid option passed, please pass 'on' or 'off'"
|
||||||
echo "::: Invalid option passed, please pass 'on' or 'off'"
|
exit 1
|
||||||
exit 1
|
fi
|
||||||
fi
|
restartDNS
|
||||||
restartDNS
|
|
||||||
}
|
}
|
||||||
|
|
||||||
piholeStatus() {
|
piholeStatus() {
|
||||||
|
|
Loading…
Reference in a new issue