mirror of
https://github.com/kasmtech/workspaces-core-images.git
synced 2024-11-25 08:53:12 +01:00
KASM-5378 Update vnc_startup.sh to wait until recorder service terminates in case of Xvnc being killed
This commit is contained in:
parent
bc933d9187
commit
a054d3b689
@ -353,6 +353,19 @@ function ensure_recorder_running () {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function ensure_recorder_terminates_gracefully () {
|
||||||
|
local kasm_recorder_process="/dockerstartup/recorder/kasm_recorder_service"
|
||||||
|
|
||||||
|
while true
|
||||||
|
do
|
||||||
|
recorder_pid=$(pgrep -f "$kasm_recorder_process") || true
|
||||||
|
if [[ -z $recorder_pid ]]; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
############ END FUNCTION DECLARATIONS ###########
|
############ END FUNCTION DECLARATIONS ###########
|
||||||
|
|
||||||
@ -452,6 +465,14 @@ do
|
|||||||
;;
|
;;
|
||||||
window_manager)
|
window_manager)
|
||||||
echo "Window manager crashed, restarting"
|
echo "Window manager crashed, restarting"
|
||||||
|
|
||||||
|
if [[ ${KASM_SVC_RECORDER:-1} == 1 ]]; then
|
||||||
|
echo "Waiting for recorder service to upload all pending recordings"
|
||||||
|
ensure_recorder_terminates_gracefully
|
||||||
|
echo "Recorder service has terminated, exiting container"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
start_window_manager
|
start_window_manager
|
||||||
;;
|
;;
|
||||||
kasm_audio_out_websocket)
|
kasm_audio_out_websocket)
|
||||||
|
Loading…
Reference in New Issue
Block a user