Merge branch 'feature/defensiveTweaks' of github.com:pi-hole/pi-hole into feature/defensiveTweaks

This commit is contained in:
Dan Schaper 2016-11-02 04:22:29 -07:00
commit e832bfc61e

4
pihole
View file

@ -132,12 +132,12 @@ piholeLogging() {
if [[ "${1}" == "off" ]] ; then if [[ "${1}" == "off" ]] ; then
#Disable Logging #Disable 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/^queryLogging=true/queryLogging=false/' /etc/pihole/setupVars.conf 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/^queryLogging=false/queryLogging=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'"