|
|
|
@ -18,12 +18,12 @@ piholeGitUrl="https://github.com/pi-hole/pi-hole.git"
|
|
|
|
|
piholeFilesDir="/etc/.pihole"
|
|
|
|
|
|
|
|
|
|
spinner() {
|
|
|
|
|
local pid=$1
|
|
|
|
|
local pid=${1}
|
|
|
|
|
local delay=0.50
|
|
|
|
|
local spinstr='/-\|'
|
|
|
|
|
while [ "$(ps a | awk '{print $1}' | grep "$pid")" ]; do
|
|
|
|
|
while [ "$(ps a | awk '{print $1}' | grep "${pid}")" ]; do
|
|
|
|
|
local temp=${spinstr#?}
|
|
|
|
|
printf " [%c] " "$spinstr"
|
|
|
|
|
printf " [%c] " "${spinstr}"
|
|
|
|
|
local spinstr=${temp}${spinstr%"$temp"}
|
|
|
|
|
sleep ${delay}
|
|
|
|
|
printf "\b\b\b\b\b\b"
|
|
|
|
@ -117,7 +117,6 @@ elif [[ ${piholeVersion} == ${piholeVersionLatest} && ${webVersion} != ${webVers
|
|
|
|
|
echo "::: Web Admin version is now at ${webVersion}"
|
|
|
|
|
echo "::: If you had made any changes in '/var/www/html/admin', they have been stashed using 'git stash'"
|
|
|
|
|
echo ""
|
|
|
|
|
|
|
|
|
|
elif [[ ${piholeVersion} != ${piholeVersionLatest} && ${webVersion} == ${webVersionLatest} ]]; then
|
|
|
|
|
echo "::: Pi-hole core files out of date"
|
|
|
|
|
getGitFiles ${piholeFilesDir} ${piholeGitUrl}
|
|
|
|
@ -127,7 +126,6 @@ elif [[ ${piholeVersion} != ${piholeVersionLatest} && ${webVersion} == ${webVers
|
|
|
|
|
echo "::: Pi-hole version is now at ${piholeVersion}"
|
|
|
|
|
echo "::: If you had made any changes in '/etc/.pihole', they have been stashed using 'git stash'"
|
|
|
|
|
echo ""
|
|
|
|
|
|
|
|
|
|
elif [[ ${piholeVersion} != ${piholeVersionLatest} && ${webVersion} != ${webVersionLatest} ]]; then
|
|
|
|
|
echo "::: Updating Everything"
|
|
|
|
|
getGitFiles ${piholeFilesDir} ${piholeGitUrl}
|
|
|
|
|