mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
add $SUDO into spinner control.
This commit is contained in:
parent
c179936b54
commit
eec14be10d
1 changed files with 2 additions and 4 deletions
|
@ -70,12 +70,10 @@ fi
|
||||||
###All credit for the below function goes to http://fitnr.com/showing-a-bash-spinner.html
|
###All credit for the below function goes to http://fitnr.com/showing-a-bash-spinner.html
|
||||||
spinner(){
|
spinner(){
|
||||||
local pid=$1
|
local pid=$1
|
||||||
local delay=0.001
|
|
||||||
local spinstr='/-\|'
|
|
||||||
|
|
||||||
spin='-\|/'
|
spin='-\|/'
|
||||||
i=0
|
i=0
|
||||||
while kill -0 $pid 2>/dev/null
|
while $SUDO kill -0 $pid 2>/dev/null
|
||||||
do
|
do
|
||||||
i=$(( (i+1) %4 ))
|
i=$(( (i+1) %4 ))
|
||||||
printf "\b${spin:$i:1}"
|
printf "\b${spin:$i:1}"
|
||||||
|
|
Loading…
Reference in a new issue