Curl does not wait for user input. Force user to quit installation if there are packages that need to be upgraded.

This commit is contained in:
Promofaux 2016-01-27 22:08:43 +00:00
parent ea7592a8cc
commit cc0997f110

View file

@ -331,17 +331,19 @@ checkForDependencies(){
echo "::: Your pi is up to date! Continuing with pi-hole installation..." echo "::: Your pi is up to date! Continuing with pi-hole installation..."
else else
echo "::: There are $updatesToInstall updates availible for your pi!" echo "::: There are $updatesToInstall updates availible for your pi!"
echo "::: Please consider running 'sudo apt-get upgrade' before continuing with installation" echo "::: Please run 'sudo apt-get upgrade' before continuing with installation"
echo ":::" echo ":::"
echo "::: Quitting install, please run 'curl -L install.pi-hole.net | bash' after updating packages!"
exit
#add in a prompt to give users the option to quit installation or continue #add in a prompt to give users the option to quit installation or continue
#echo -n "::: Would you like to continue with the pi-hole installation? (Y/n):" #echo -n "::: Would you like to continue with the pi-hole installation? (Y/n):"
read -p "::: Would you like to continue with the pi-hole installation? (Y/n):" answer #read answer
case "$answer" in #case "$answer" in
[yY][eE][sS]|[yY] ) echo "::: Continuing!";; # [yY][eE][sS]|[yY] ) echo "::: Continuing!";;
* ) echo "::: Quitting install, please run 'curl -L install.pi-hole.net | bash' after updating packages!" # * ) echo "::: Quitting install, please run 'curl -L install.pi-hole.net | bash' after updating packages!"
exit 0;;
esac #esac
fi fi
echo ":::" echo ":::"