mirror of
https://github.com/kasmtech/workspaces-core-images.git
synced 2025-06-26 06:51:45 +02:00
KASM-5378 remove redundant while loop.
This commit is contained in:
parent
07a282c010
commit
40ea60d229
@ -331,13 +331,8 @@ function ensure_recorder_running () {
|
|||||||
|
|
||||||
local recorder_pid=$(pgrep -f "^$kasm_recorder_process") || true
|
local recorder_pid=$(pgrep -f "^$kasm_recorder_process") || true
|
||||||
|
|
||||||
while [ $SECONDS -lt 16 ] && [[ -z $recorder_pid ]]
|
|
||||||
do
|
|
||||||
local recorder_pid=$(pgrep -f "^$kasm_recorder_process") || true
|
|
||||||
sleep 1
|
|
||||||
done
|
|
||||||
|
|
||||||
if [[ -z $kasm_recorder_pid ]]; then
|
if [[ -z $kasm_recorder_pid ]]; then
|
||||||
|
# This leverages the outside while loop that calls this function to provider checking ever x seconds.
|
||||||
if [[ -z $recorder_pid ]] && (( $SECONDS > 15 )); then
|
if [[ -z $recorder_pid ]] && (( $SECONDS > 15 )); then
|
||||||
echo "$kasm_recorder_process: not started, exiting"
|
echo "$kasm_recorder_process: not started, exiting"
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user