move vars to pihole

This commit is contained in:
tuplink 2016-10-20 13:31:51 -04:00
parent a66a9cafe4
commit f225a5dcd0
4 changed files with 15 additions and 17 deletions

View file

@ -30,10 +30,7 @@ if [[ $# = 0 ]]; then
fi fi
#globals #globals
basename=pihole
piholeDir=/etc/${basename}
adList=${piholeDir}/gravity.list
blacklist=${piholeDir}/blacklist.txt
reload=true reload=true
addmode=true addmode=true
verbose=true verbose=true

View file

@ -31,10 +31,6 @@ if [[ $# = 0 ]]; then
fi fi
#globals #globals
basename=pihole
piholeDir=/etc/${basename}
adList=${piholeDir}/gravity.list
whitelist=${piholeDir}/whitelist.txt
reload=true reload=true
addmode=true addmode=true
verbose=true verbose=true

View file

@ -26,15 +26,6 @@ helpFunc()
} }
adListFile=/etc/pihole/adlists.list
adListDefault=/etc/pihole/adlists.default
whitelistScript=/opt/pihole/whitelist.sh
blacklistScript=/opt/pihole/blacklist.sh
whitelistFile=/etc/pihole/whitelist.txt
blacklistFile=/etc/pihole/blacklist.txt
#Source the setupVars from install script for the IP
setupVars=/etc/pihole/setupVars.conf
if [[ -f ${setupVars} ]];then if [[ -f ${setupVars} ]];then
. /etc/pihole/setupVars.conf . /etc/pihole/setupVars.conf
else else

14
pihole
View file

@ -122,6 +122,20 @@ if [[ $# = 0 ]]; then
helpFunc helpFunc
fi fi
#Source the setupVars from install script for the IP
setupVars=/etc/pihole/setupVars.conf
export basename=pihole
export piholeDir=/etc/${basename}
export adList=${piholeDir}/gravity.list
export blacklist=${piholeDir}/blacklist.txt
export whitelist=${piholeDir}/whitelist.txt
export adListFile=${piholeDir}/adlists.list
export adListDefault=${piholeDir}/adlists.default
export whitelistScript=/opt/pihole/whitelist.sh
export blacklistScript=/opt/pihole/blacklist.sh
# Handle redirecting to specific functions based on arguments # Handle redirecting to specific functions based on arguments
case "$1" in case "$1" in
"-w" | "whitelist" ) whitelistFunc "$@";; "-w" | "whitelist" ) whitelistFunc "$@";;