Git clone/update now occurs right after installer dependency checks. Allows for inclusion of installer source files in the repo. Passes set -e

This commit is contained in:
Dan Schaper 2016-10-10 00:02:50 -07:00
parent 8a15fd44d5
commit ca59b808d8

View file

@ -628,22 +628,15 @@ install_dependent_packages(){
} }
getGitFiles() { getGitFiles() {
# Setup git repos for base files and web admin # Setup git repos for directory and repository passed
# as arguments 1 and 2
echo ":::" echo ":::"
echo "::: Checking for existing base files..." echo "::: Checking for existing base files..."
if is_repo ${piholeFilesDir}; then if is_repo ${1}; then
update_repo ${piholeFilesDir} update_repo ${1}
else else
make_repo ${piholeFilesDir} ${piholeGitUrl} make_repo ${1} ${2}
fi fi
#echo ":::"
#echo "::: Checking for existing web interface..."
#if is_repo ${webInterfaceDir}; then
# make_repo ${webInterfaceDir} ${webInterfaceGitUrl}
#else
# update_repo ${webInterfaceDir}
# fi
} }
is_repo() { is_repo() {
@ -787,7 +780,6 @@ installPihole() {
else else
printf "\n:::\tWarning: 'lighty-enable-mod' utility not found. Please ensure fastcgi is enabled if you experience issues.\n" printf "\n:::\tWarning: 'lighty-enable-mod' utility not found. Please ensure fastcgi is enabled if you experience issues.\n"
fi fi
getGitFiles
installScripts installScripts
installConfigs installConfigs
CreateLogFile CreateLogFile
@ -802,7 +794,6 @@ installPihole() {
updatePihole() { updatePihole() {
# Install base files and web interface # Install base files and web interface
stopServices stopServices
getGitFiles
installScripts installScripts
installConfigs installConfigs
CreateLogFile CreateLogFile
@ -907,9 +898,13 @@ notify_package_updates_available
install_dependent_packages INSTALLER_DEPS[@] install_dependent_packages INSTALLER_DEPS[@]
if [[ ${useUpdateVars} == false ]]; then if [[ ${useUpdateVars} == false ]]; then
# Display welcome dialogs
welcomeDialogs welcomeDialogs
# Create directory for Pi-hole storage
mkdir -p /etc/pihole/ mkdir -p /etc/pihole/
# # Get Git files for Core and Admin
getGitFiles ${piholeFilesDir} ${piholeGitUrl}
getGitFiles ${webInterfaceDir} ${webInterfaceGitUrl}
# Find IP used to route to outside world # Find IP used to route to outside world
findIPRoute findIPRoute
# Find interfaces and let the user choose one # Find interfaces and let the user choose one