Wrap script in main() - prepare for no more sudo

This commit is contained in:
Dan Schaper 2016-10-07 18:22:40 -07:00
parent 10ad32de9b
commit 962d162d75

View file

@ -909,6 +909,7 @@ updateDialogs(){
} }
######## MAIN MAIN MAIN ######## ######## MAIN MAIN MAIN ########
main () {
if [[ -f ${setupVars} ]];then if [[ -f ${setupVars} ]];then
. ${setupVars} . ${setupVars}
@ -984,3 +985,6 @@ fi
echo ":::" echo ":::"
echo "::: The install log is located at: /etc/pihole/install.log" echo "::: The install log is located at: /etc/pihole/install.log"
echo "::: View the web interface at http://pi.hole/admin or http://${IPv4addr%/*}/admin" echo "::: View the web interface at http://pi.hole/admin or http://${IPv4addr%/*}/admin"
}
main "$@"