diff --git a/ct/create_lxc.sh b/ct/create_lxc.sh index a62fd2d0..df35a03b 100644 --- a/ct/create_lxc.sh +++ b/ct/create_lxc.sh @@ -64,6 +64,7 @@ function spinner() { # This function displays an informational message with a yellow color. function msg_info() { + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi local msg="$1" echo -ne "${TAB}${YW}${HOLD}${msg}${HOLD}" spinner & diff --git a/misc/build.func b/misc/build.func index e0419a2e..960cf462 100644 --- a/misc/build.func +++ b/misc/build.func @@ -98,6 +98,7 @@ spinner() { # This function displays an informational message with a yellow color. msg_info() { + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi local msg="$1" echo -ne "${TAB}${YW}${HOLD}${msg}${HOLD}" spinner & diff --git a/misc/install.func b/misc/install.func index b0234479..5087510c 100644 --- a/misc/install.func +++ b/misc/install.func @@ -90,6 +90,7 @@ spinner() { # This function displays an informational message with a yellow color. msg_info() { + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi local msg="$1" echo -ne "${TAB}${YW}${HOLD}${msg}${HOLD}" spinner &