mirror of
https://github.com/pi-hole/pi-hole
synced 2024-11-19 06:38:17 +00:00
Merged branch ScriptCleanup-Dev into development
This commit is contained in:
commit
37c1999965
21
gravity.sh
21
gravity.sh
@ -75,18 +75,19 @@ if [[ -r $piholeDir/pihole.conf ]];then
|
||||
fi
|
||||
|
||||
|
||||
spinner(){
|
||||
spinner()
|
||||
{
|
||||
local pid=$1
|
||||
|
||||
spin='-\|/'
|
||||
i=0
|
||||
while $SUDO kill -0 "$pid" 2>/dev/null
|
||||
do
|
||||
i=$(( (i+1) %4 ))
|
||||
printf "\b%s" "${spin:$i:1}"
|
||||
sleep .1
|
||||
local delay=0.50
|
||||
local spinstr='|/-\'
|
||||
while [ "$(ps a | awk '{print $1}' | grep "$pid")" ]; do
|
||||
local temp=${spinstr#?}
|
||||
printf " [%c] " "$spinstr"
|
||||
local spinstr=$temp${spinstr%"$temp"}
|
||||
sleep $delay
|
||||
printf "\b\b\b\b\b\b"
|
||||
done
|
||||
printf "\b"
|
||||
printf " \b\b\b\b"
|
||||
}
|
||||
|
||||
###########################
|
||||
|
Loading…
Reference in New Issue
Block a user