Skip to content

Commit

Permalink
Merge pull request pi-hole#3904 from ganto/fix/debug-non-web-2
Browse files Browse the repository at this point in the history
piholeDebug: Diagnose output if (Web) git directory is not found
  • Loading branch information
DL6ER authored Dec 10, 2020
2 parents 16fb914 + 9dc539c commit 78cdd34
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion advanced/Scripts/piholeDebug.sh
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,17 @@ compare_local_version_to_git_version() {
return 1
fi
else
:
# There is no git directory so check if the web interface was disabled
local setup_vars_web_interface
setup_vars_web_interface=$(< ${PIHOLE_SETUP_VARS_FILE} grep ^INSTALL_WEB_INTERFACE | cut -d '=' -f2)
if [[ "${pihole_component}" == "Web" ]] && [[ "${setup_vars_web_interface}" == "false" ]]; then
log_write "${INFO} ${pihole_component}: Disabled in setupVars.conf via INSTALL_WEB_INTERFACE=false"
else
# Return an error message
log_write "${COL_RED}Directory ${git_dir} doesn't exist${COL_NC}"
# and exit with a non zero code
return 1
fi
fi
}

Expand Down

0 comments on commit 78cdd34

Please sign in to comment.