mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
Merged branch ScriptCleanup-Dev into development
This commit is contained in:
commit
37c1999965
1 changed files with 13 additions and 12 deletions
25
gravity.sh
25
gravity.sh
|
@ -75,18 +75,19 @@ if [[ -r $piholeDir/pihole.conf ]];then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
spinner(){
|
spinner()
|
||||||
local pid=$1
|
{
|
||||||
|
local pid=$1
|
||||||
spin='-\|/'
|
local delay=0.50
|
||||||
i=0
|
local spinstr='|/-\'
|
||||||
while $SUDO kill -0 "$pid" 2>/dev/null
|
while [ "$(ps a | awk '{print $1}' | grep "$pid")" ]; do
|
||||||
do
|
local temp=${spinstr#?}
|
||||||
i=$(( (i+1) %4 ))
|
printf " [%c] " "$spinstr"
|
||||||
printf "\b%s" "${spin:$i:1}"
|
local spinstr=$temp${spinstr%"$temp"}
|
||||||
sleep .1
|
sleep $delay
|
||||||
done
|
printf "\b\b\b\b\b\b"
|
||||||
printf "\b"
|
done
|
||||||
|
printf " \b\b\b\b"
|
||||||
}
|
}
|
||||||
|
|
||||||
###########################
|
###########################
|
||||||
|
|
Loading…
Reference in a new issue