KASM-4975 "Feature/ vnc session recording"

This commit is contained in:
Mariusz Marciniak 2023-12-22 23:12:10 +00:00 committed by Justin Travis
parent 302590dee5
commit b1cf97dc31
10 changed files with 131 additions and 6 deletions

View File

@ -1,6 +1,8 @@
files: &UNIVERSAL_CHANGE_FILES files: &UNIVERSAL_CHANGE_FILES
- src/common/** - src/common/**
- src/common/startup_scripts/** - src/common/startup_scripts/**
- src/common/scripts/**
- src/common/scripts/kasm_hook_scripts/**
- src/ubuntu/install/audio/** - src/ubuntu/install/audio/**
- src/ubuntu/install/audio_input/** - src/ubuntu/install/audio_input/**
- src/ubuntu/install/cleanup/** - src/ubuntu/install/cleanup/**
@ -18,6 +20,7 @@ files: &UNIVERSAL_CHANGE_FILES
- src/ubuntu/install/squid/** - src/ubuntu/install/squid/**
- src/ubuntu/install/tools/** - src/ubuntu/install/tools/**
- src/ubuntu/install/webcam/** - src/ubuntu/install/webcam/**
- src/ubuntu/install/recorder/**
- ci-scripts/** - ci-scripts/**
- .gitlab-ci.yml - .gitlab-ci.yml

View File

@ -87,12 +87,16 @@ RUN bash $INST_SCRIPTS/gamepad/install_gamepad.sh && rm -rf $INST_SCRIPTS/gamepa
COPY ./src/ubuntu/install/webcam $INST_SCRIPTS/webcam/ COPY ./src/ubuntu/install/webcam $INST_SCRIPTS/webcam/
RUN bash $INST_SCRIPTS/webcam/install_webcam.sh && rm -rf $INST_SCRIPTS/webcam/ RUN bash $INST_SCRIPTS/webcam/install_webcam.sh && rm -rf $INST_SCRIPTS/webcam/
### Install Printer ### Install Printer Service
COPY ./src/ubuntu/install/printer $INST_SCRIPTS/printer/ COPY ./src/ubuntu/install/printer $INST_SCRIPTS/printer/
COPY ./src/ubuntu/install/printer/start_cups.sh /etc/cups/start_cups.sh COPY ./src/ubuntu/install/printer/start_cups.sh /etc/cups/start_cups.sh
RUN bash $INST_SCRIPTS/printer/install_printer.sh && rm -rf $INST_SCRIPTS/printer RUN bash $INST_SCRIPTS/printer/install_printer.sh && rm -rf $INST_SCRIPTS/printer
COPY ./src/ubuntu/install/printer/resources/*.ppd /etc/cups/ppd/ COPY ./src/ubuntu/install/printer/resources/*.ppd /etc/cups/ppd/
### Install Recorder Service
COPY ./src/ubuntu/install/recorder $INST_SCRIPTS/recorder/
RUN bash $INST_SCRIPTS/recorder/install_recorder.sh && rm -rf $INST_SCRIPTS/recorder
### Install custom cursors ### Install custom cursors
COPY ./src/ubuntu/install/cursors $INST_SCRIPTS/cursors/ COPY ./src/ubuntu/install/cursors $INST_SCRIPTS/cursors/
RUN bash $INST_SCRIPTS/cursors/install_cursors.sh && rm -rf $INST_SCRIPTS/cursors/ RUN bash $INST_SCRIPTS/cursors/install_cursors.sh && rm -rf $INST_SCRIPTS/cursors/
@ -140,6 +144,11 @@ ENV HOME=/home/kasm-user
WORKDIR $HOME WORKDIR $HOME
RUN mkdir -p $HOME && chown -R 1000:0 $HOME RUN mkdir -p $HOME && chown -R 1000:0 $HOME
### Create user exclusively for session recording purposes
RUN (groupadd -g 1001 kasm-recorder \
&& useradd -M -u 1001 -g 1001 kasm-recorder \
&& usermod -a -G kasm-recorder) ; exit 0
### FIX PERMISSIONS ## Objective is to change the owner of non-home paths to root, remove write permissions, and set execute where required ### FIX PERMISSIONS ## Objective is to change the owner of non-home paths to root, remove write permissions, and set execute where required
# these files are created on container first exec, by the default user, so we have to create them since default will not have write perm # these files are created on container first exec, by the default user, so we have to create them since default will not have write perm
RUN touch $STARTUPDIR/wm.log \ RUN touch $STARTUPDIR/wm.log \
@ -159,6 +168,7 @@ RUN touch $STARTUPDIR/wm.log \
&& chmod 755 $STARTUPDIR/gamepad/kasm_gamepad_server \ && chmod 755 $STARTUPDIR/gamepad/kasm_gamepad_server \
&& chmod 755 $STARTUPDIR/webcam/kasm_webcam_server \ && chmod 755 $STARTUPDIR/webcam/kasm_webcam_server \
&& chmod 755 $STARTUPDIR/printer/kasm_printer_service \ && chmod 755 $STARTUPDIR/printer/kasm_printer_service \
&& chmod 755 $STARTUPDIR/recorder/kasm_recorder_service \
&& chmod 755 $STARTUPDIR/generate_container_user \ && chmod 755 $STARTUPDIR/generate_container_user \
&& chmod +x $STARTUPDIR/jsmpeg/kasm_audio_out-linux \ && chmod +x $STARTUPDIR/jsmpeg/kasm_audio_out-linux \
&& rm -rf $STARTUPDIR/install \ && rm -rf $STARTUPDIR/install \

View File

@ -89,12 +89,16 @@ RUN bash $INST_SCRIPTS/gamepad/install_gamepad.sh && rm -rf $INST_SCRIPTS/gamepa
COPY ./src/ubuntu/install/webcam $INST_SCRIPTS/webcam/ COPY ./src/ubuntu/install/webcam $INST_SCRIPTS/webcam/
RUN bash $INST_SCRIPTS/webcam/install_webcam.sh && rm -rf $INST_SCRIPTS/webcam/ RUN bash $INST_SCRIPTS/webcam/install_webcam.sh && rm -rf $INST_SCRIPTS/webcam/
### Install Printer ### Install Printer Service
COPY ./src/ubuntu/install/printer $INST_SCRIPTS/printer/ COPY ./src/ubuntu/install/printer $INST_SCRIPTS/printer/
COPY ./src/ubuntu/install/printer/start_cups.sh /etc/cups/start_cups.sh COPY ./src/ubuntu/install/printer/start_cups.sh /etc/cups/start_cups.sh
RUN bash $INST_SCRIPTS/printer/install_printer.sh && rm -rf $INST_SCRIPTS/printer RUN bash $INST_SCRIPTS/printer/install_printer.sh && rm -rf $INST_SCRIPTS/printer
COPY ./src/ubuntu/install/printer/resources/*.ppd /etc/cups/ppd/ COPY ./src/ubuntu/install/printer/resources/*.ppd /etc/cups/ppd/
### Install Recorder Service
COPY ./src/ubuntu/install/recorder $INST_SCRIPTS/recorder/
RUN bash $INST_SCRIPTS/recorder/install_recorder.sh && rm -rf $INST_SCRIPTS/recorder
### Copy built Squid ### Copy built Squid
COPY --from=squid_builder /usr/local/squid /usr/local/squid COPY --from=squid_builder /usr/local/squid /usr/local/squid
@ -134,6 +138,11 @@ ENV HOME /home/kasm-user
WORKDIR $HOME WORKDIR $HOME
RUN mkdir -p $HOME && chown -R 1000:0 $HOME RUN mkdir -p $HOME && chown -R 1000:0 $HOME
### Create user exclusively for session recording purposes
RUN (groupadd -g 1001 kasm-recorder \
&& useradd -M -u 1001 -g 1001 kasm-recorder \
&& usermod -a -G kasm-recorder) ; exit 0
### FIX PERMISSIONS ## Objective is to change the owner of non-home paths to root, remove write permissions, and set execute where required ### FIX PERMISSIONS ## Objective is to change the owner of non-home paths to root, remove write permissions, and set execute where required
# these files are created on container first exec, by the default user, so we have to create them since default will not have write perm # these files are created on container first exec, by the default user, so we have to create them since default will not have write perm
RUN touch $STARTUPDIR/wm.log \ RUN touch $STARTUPDIR/wm.log \
@ -154,6 +163,7 @@ RUN touch $STARTUPDIR/wm.log \
&& chmod 755 $STARTUPDIR/webcam/kasm_webcam_server \ && chmod 755 $STARTUPDIR/webcam/kasm_webcam_server \
&& chmod 755 $STARTUPDIR/generate_container_user \ && chmod 755 $STARTUPDIR/generate_container_user \
&& chmod 755 $STARTUPDIR/printer/kasm_printer_service \ && chmod 755 $STARTUPDIR/printer/kasm_printer_service \
&& chmod 755 $STARTUPDIR/recorder/kasm_recorder_service \
&& chmod +x $STARTUPDIR/jsmpeg/kasm_audio_out-linux \ && chmod +x $STARTUPDIR/jsmpeg/kasm_audio_out-linux \
&& rm -rf $STARTUPDIR/install \ && rm -rf $STARTUPDIR/install \
&& mkdir -p $STARTUPDIR/kasmrx/Downloads \ && mkdir -p $STARTUPDIR/kasmrx/Downloads \

View File

@ -91,12 +91,16 @@ RUN bash $INST_SCRIPTS/gamepad/install_gamepad.sh && rm -rf $INST_SCRIPTS/gamepa
COPY ./src/ubuntu/install/webcam $INST_SCRIPTS/webcam/ COPY ./src/ubuntu/install/webcam $INST_SCRIPTS/webcam/
RUN bash $INST_SCRIPTS/webcam/install_webcam.sh && rm -rf $INST_SCRIPTS/webcam/ RUN bash $INST_SCRIPTS/webcam/install_webcam.sh && rm -rf $INST_SCRIPTS/webcam/
### Install Printer ### Install Printer Service
COPY ./src/ubuntu/install/printer $INST_SCRIPTS/printer/ COPY ./src/ubuntu/install/printer $INST_SCRIPTS/printer/
COPY ./src/ubuntu/install/printer/start_cups.sh /etc/cups/start_cups.sh COPY ./src/ubuntu/install/printer/start_cups.sh /etc/cups/start_cups.sh
RUN bash $INST_SCRIPTS/printer/install_printer.sh && rm -rf $INST_SCRIPTS/printer RUN bash $INST_SCRIPTS/printer/install_printer.sh && rm -rf $INST_SCRIPTS/printer
COPY ./src/ubuntu/install/printer/resources/*.ppd /etc/cups/ppd/ COPY ./src/ubuntu/install/printer/resources/*.ppd /etc/cups/ppd/
### Install Recorder Service
COPY ./src/ubuntu/install/recorder $INST_SCRIPTS/recorder/
RUN bash $INST_SCRIPTS/recorder/install_recorder.sh && rm -rf $INST_SCRIPTS/recorder
### Copy built Squid ### Copy built Squid
COPY --from=squid_builder /usr/local/squid /usr/local/squid COPY --from=squid_builder /usr/local/squid /usr/local/squid
@ -136,6 +140,11 @@ ENV HOME /home/kasm-user
WORKDIR $HOME WORKDIR $HOME
RUN mkdir -p $HOME && chown -R 1000:0 $HOME RUN mkdir -p $HOME && chown -R 1000:0 $HOME
### Create user exclusively for session recording purposes
RUN (groupadd -g 1001 kasm-recorder \
&& useradd -M -u 1001 -g 1001 kasm-recorder \
&& usermod -a -G kasm-recorder) ; exit 0
### FIX PERMISSIONS ## Objective is to change the owner of non-home paths to root, remove write permissions, and set execute where required ### FIX PERMISSIONS ## Objective is to change the owner of non-home paths to root, remove write permissions, and set execute where required
# these files are created on container first exec, by the default user, so we have to create them since default will not have write perm # these files are created on container first exec, by the default user, so we have to create them since default will not have write perm
RUN touch $STARTUPDIR/wm.log \ RUN touch $STARTUPDIR/wm.log \
@ -156,6 +165,7 @@ RUN touch $STARTUPDIR/wm.log \
&& chmod 755 $STARTUPDIR/webcam/kasm_webcam_server \ && chmod 755 $STARTUPDIR/webcam/kasm_webcam_server \
&& chmod 755 $STARTUPDIR/generate_container_user \ && chmod 755 $STARTUPDIR/generate_container_user \
&& chmod 755 $STARTUPDIR/printer/kasm_printer_service \ && chmod 755 $STARTUPDIR/printer/kasm_printer_service \
&& chmod 755 $STARTUPDIR/recorder/kasm_recorder_service \
&& chmod +x $STARTUPDIR/jsmpeg/kasm_audio_out-linux \ && chmod +x $STARTUPDIR/jsmpeg/kasm_audio_out-linux \
&& rm -rf $STARTUPDIR/install \ && rm -rf $STARTUPDIR/install \
&& mkdir -p $STARTUPDIR/kasmrx/Downloads \ && mkdir -p $STARTUPDIR/kasmrx/Downloads \

View File

@ -99,12 +99,16 @@ RUN bash $INST_SCRIPTS/gamepad/install_gamepad.sh && rm -rf $INST_SCRIPTS/gamepa
COPY ./src/ubuntu/install/webcam $INST_SCRIPTS/webcam/ COPY ./src/ubuntu/install/webcam $INST_SCRIPTS/webcam/
RUN bash $INST_SCRIPTS/webcam/install_webcam.sh && rm -rf $INST_SCRIPTS/webcam/ RUN bash $INST_SCRIPTS/webcam/install_webcam.sh && rm -rf $INST_SCRIPTS/webcam/
### Install Printer ### Install Printer Service
COPY ./src/ubuntu/install/printer $INST_SCRIPTS/printer/ COPY ./src/ubuntu/install/printer $INST_SCRIPTS/printer/
COPY ./src/ubuntu/install/printer/start_cups.sh /etc/cups/start_cups.sh COPY ./src/ubuntu/install/printer/start_cups.sh /etc/cups/start_cups.sh
RUN bash $INST_SCRIPTS/printer/install_printer.sh && rm -rf $INST_SCRIPTS/printer RUN bash $INST_SCRIPTS/printer/install_printer.sh && rm -rf $INST_SCRIPTS/printer
COPY ./src/ubuntu/install/printer/resources/*.ppd /etc/cups/ppd/ COPY ./src/ubuntu/install/printer/resources/*.ppd /etc/cups/ppd/
### Install Recorder Service
COPY ./src/ubuntu/install/recorder $INST_SCRIPTS/recorder/
RUN bash $INST_SCRIPTS/recorder/install_recorder.sh && rm -rf $INST_SCRIPTS/recorder
### Copy built Squid ### Copy built Squid
COPY --from=squid_builder /usr/local/squid /usr/local/squid COPY --from=squid_builder /usr/local/squid /usr/local/squid
@ -144,6 +148,11 @@ ENV HOME /home/kasm-user
WORKDIR $HOME WORKDIR $HOME
RUN mkdir -p $HOME && chown -R 1000:0 $HOME RUN mkdir -p $HOME && chown -R 1000:0 $HOME
### Create user exclusively for session recording purposes
RUN (groupadd -g 1001 kasm-recorder \
&& useradd -M -u 1001 -g 1001 kasm-recorder \
&& usermod -a -G kasm-recorder) ; exit 0
### FIX PERMISSIONS ## Objective is to change the owner of non-home paths to root, remove write permissions, and set execute where required ### FIX PERMISSIONS ## Objective is to change the owner of non-home paths to root, remove write permissions, and set execute where required
# these files are created on container first exec, by the default user, so we have to create them since default will not have write perm # these files are created on container first exec, by the default user, so we have to create them since default will not have write perm
RUN touch $STARTUPDIR/wm.log \ RUN touch $STARTUPDIR/wm.log \
@ -164,6 +173,7 @@ RUN touch $STARTUPDIR/wm.log \
&& chmod 755 $STARTUPDIR/webcam/kasm_webcam_server \ && chmod 755 $STARTUPDIR/webcam/kasm_webcam_server \
&& chmod 755 $STARTUPDIR/generate_container_user \ && chmod 755 $STARTUPDIR/generate_container_user \
&& chmod 755 $STARTUPDIR/printer/kasm_printer_service \ && chmod 755 $STARTUPDIR/printer/kasm_printer_service \
&& chmod 755 $STARTUPDIR/recorder/kasm_recorder_service \
&& chmod +x $STARTUPDIR/jsmpeg/kasm_audio_out-linux \ && chmod +x $STARTUPDIR/jsmpeg/kasm_audio_out-linux \
&& rm -rf $STARTUPDIR/install \ && rm -rf $STARTUPDIR/install \
&& mkdir -p $STARTUPDIR/kasmrx/Downloads \ && mkdir -p $STARTUPDIR/kasmrx/Downloads \

View File

@ -114,12 +114,16 @@ RUN bash $INST_SCRIPTS/gamepad/install_gamepad.sh && rm -rf $INST_SCRIPTS/gamepa
COPY ./src/ubuntu/install/webcam $INST_SCRIPTS/webcam/ COPY ./src/ubuntu/install/webcam $INST_SCRIPTS/webcam/
RUN bash $INST_SCRIPTS/webcam/install_webcam.sh && rm -rf $INST_SCRIPTS/webcam/ RUN bash $INST_SCRIPTS/webcam/install_webcam.sh && rm -rf $INST_SCRIPTS/webcam/
### Install Printer ### Install Printer Service
COPY ./src/ubuntu/install/printer $INST_SCRIPTS/printer/ COPY ./src/ubuntu/install/printer $INST_SCRIPTS/printer/
COPY ./src/ubuntu/install/printer/start_cups.sh /etc/cups/start_cups.sh COPY ./src/ubuntu/install/printer/start_cups.sh /etc/cups/start_cups.sh
RUN bash $INST_SCRIPTS/printer/install_printer.sh && rm -rf $INST_SCRIPTS/printer RUN bash $INST_SCRIPTS/printer/install_printer.sh && rm -rf $INST_SCRIPTS/printer
COPY ./src/ubuntu/install/printer/resources/*.ppd /etc/cups/ppd/ COPY ./src/ubuntu/install/printer/resources/*.ppd /etc/cups/ppd/
### Install Recorder Service
COPY ./src/ubuntu/install/recorder $INST_SCRIPTS/recorder/
RUN bash $INST_SCRIPTS/recorder/install_recorder.sh && rm -rf $INST_SCRIPTS/recorder
### Copy built Squid ### Copy built Squid
COPY --from=squid_builder /usr/local/squid /usr/local/squid COPY --from=squid_builder /usr/local/squid /usr/local/squid
@ -163,6 +167,11 @@ ENV HOME /home/kasm-user
WORKDIR $HOME WORKDIR $HOME
RUN mkdir -p $HOME && chown -R 1000:0 $HOME RUN mkdir -p $HOME && chown -R 1000:0 $HOME
### Create user exclusively for session recording purposes
RUN (groupadd -g 1001 kasm-recorder \
&& useradd -M -u 1001 -g 1001 kasm-recorder \
&& usermod -a -G kasm-recorder) ; exit 0
### FIX PERMISSIONS ## Objective is to change the owner of non-home paths to root, remove write permissions, and set execute where required ### FIX PERMISSIONS ## Objective is to change the owner of non-home paths to root, remove write permissions, and set execute where required
# these files are created on container first exec, by the default user, so we have to create them since default will not have write perm # these files are created on container first exec, by the default user, so we have to create them since default will not have write perm
RUN touch $STARTUPDIR/wm.log \ RUN touch $STARTUPDIR/wm.log \
@ -183,6 +192,7 @@ RUN touch $STARTUPDIR/wm.log \
&& chmod 755 $STARTUPDIR/webcam/kasm_webcam_server \ && chmod 755 $STARTUPDIR/webcam/kasm_webcam_server \
&& chmod 755 $STARTUPDIR/generate_container_user \ && chmod 755 $STARTUPDIR/generate_container_user \
&& chmod 755 $STARTUPDIR/printer/kasm_printer_service \ && chmod 755 $STARTUPDIR/printer/kasm_printer_service \
&& chmod 755 $STARTUPDIR/recorder/kasm_recorder_service \
&& chmod +x $STARTUPDIR/jsmpeg/kasm_audio_out-linux \ && chmod +x $STARTUPDIR/jsmpeg/kasm_audio_out-linux \
&& rm -rf $STARTUPDIR/install \ && rm -rf $STARTUPDIR/install \
&& mkdir -p $STARTUPDIR/kasmrx/Downloads \ && mkdir -p $STARTUPDIR/kasmrx/Downloads \

View File

@ -89,12 +89,16 @@ RUN bash $INST_SCRIPTS/gamepad/install_gamepad.sh && rm -rf $INST_SCRIPTS/gamepa
COPY ./src/ubuntu/install/webcam $INST_SCRIPTS/webcam/ COPY ./src/ubuntu/install/webcam $INST_SCRIPTS/webcam/
RUN bash $INST_SCRIPTS/webcam/install_webcam.sh && rm -rf $INST_SCRIPTS/webcam/ RUN bash $INST_SCRIPTS/webcam/install_webcam.sh && rm -rf $INST_SCRIPTS/webcam/
### Install Printer ### Install Printer Service
COPY ./src/ubuntu/install/printer $INST_SCRIPTS/printer/ COPY ./src/ubuntu/install/printer $INST_SCRIPTS/printer/
COPY ./src/ubuntu/install/printer/start_cups.sh /etc/cups/start_cups.sh COPY ./src/ubuntu/install/printer/start_cups.sh /etc/cups/start_cups.sh
RUN bash $INST_SCRIPTS/printer/install_printer.sh && rm -rf $INST_SCRIPTS/printer RUN bash $INST_SCRIPTS/printer/install_printer.sh && rm -rf $INST_SCRIPTS/printer
COPY ./src/ubuntu/install/printer/resources/*.ppd /etc/cups/ppd/ COPY ./src/ubuntu/install/printer/resources/*.ppd /etc/cups/ppd/
### Install Recorder Service
COPY ./src/ubuntu/install/recorder $INST_SCRIPTS/recorder/
RUN bash $INST_SCRIPTS/recorder/install_recorder.sh && rm -rf $INST_SCRIPTS/recorder
### Copy built Squid ### Copy built Squid
COPY --from=squid_builder /usr/local/squid /usr/local/squid COPY --from=squid_builder /usr/local/squid /usr/local/squid
@ -138,6 +142,11 @@ ENV HOME /home/kasm-user
WORKDIR $HOME WORKDIR $HOME
RUN mkdir -p $HOME && chown -R 1000:0 $HOME RUN mkdir -p $HOME && chown -R 1000:0 $HOME
### Create user exclusively for session recording purposes
RUN (groupadd -g 1001 kasm-recorder \
&& useradd -M -u 1001 -g 1001 kasm-recorder \
&& usermod -a -G kasm-recorder) ; exit 0
### FIX PERMISSIONS ## Objective is to change the owner of non-home paths to root, remove write permissions, and set execute where required ### FIX PERMISSIONS ## Objective is to change the owner of non-home paths to root, remove write permissions, and set execute where required
# these files are created on container first exec, by the default user, so we have to create them since default will not have write perm # these files are created on container first exec, by the default user, so we have to create them since default will not have write perm
RUN touch $STARTUPDIR/wm.log \ RUN touch $STARTUPDIR/wm.log \
@ -158,6 +167,7 @@ RUN touch $STARTUPDIR/wm.log \
&& chmod 755 $STARTUPDIR/webcam/kasm_webcam_server \ && chmod 755 $STARTUPDIR/webcam/kasm_webcam_server \
&& chmod 755 $STARTUPDIR/generate_container_user \ && chmod 755 $STARTUPDIR/generate_container_user \
&& chmod 755 $STARTUPDIR/printer/kasm_printer_service \ && chmod 755 $STARTUPDIR/printer/kasm_printer_service \
&& chmod 755 $STARTUPDIR/recorder/kasm_recorder_service \
&& chmod +x $STARTUPDIR/jsmpeg/kasm_audio_out-linux \ && chmod +x $STARTUPDIR/jsmpeg/kasm_audio_out-linux \
&& rm -rf $STARTUPDIR/install \ && rm -rf $STARTUPDIR/install \
&& mkdir -p $STARTUPDIR/kasmrx/Downloads \ && mkdir -p $STARTUPDIR/kasmrx/Downloads \

View File

@ -0,0 +1,31 @@
#!/bin/bash
action=$1
pid=$(pgrep -f '^/dockerstartup/recorder/kasm_recorder_service')
case $action in
"stop"|"pause")
if [ -z "$pid" ]; then
echo "No recording process found."
exit 0
fi
kill -s SIGINT $pid
while [ ! -f "/tmp/kasm_recorder.ack" ]; do
sleep 1
done
;;
"resume")
if [ ! -z "$pid" ]; then
echo "Recording process already running."
exit 0
fi
kill `pgrep -f "kasm_recorder_startup.sh"`
/dockerstartup/kasm_recorder_startup.sh &
;;
*)
echo "Usage: $0 {stop|pause|resume}"
exit 1
;;
esac

View File

@ -0,0 +1,18 @@
#!/bin/bash
set -e
mkdir -p /opt/kasm/recordings
sudo chown kasm-recorder:kasm-recorder /opt/kasm/recordings
sudo chmod 700 /opt/kasm/recordings
# wait until X display is avaiable and allow the recorder to connect to it
while ! xhost +SI:localuser:kasm-recorder 2>/dev/null; do
sleep 1
done
rm -rf /tmp/kasm_recorder.ack
while [ ! -f "/tmp/kasm_recorder.ack" ]; do
runuser -m kasm-recorder -c "$STARTUPDIR/recorder/kasm_recorder_service --debug 1 --directory /opt/kasm/recordings/ --log /tmp/recorder.log" || true
sleep 1
done

View File

@ -0,0 +1,13 @@
#!/usr/bin/env bash
### every exit != 0 fails the script
set -e
COMMIT_ID="b9f195d8aac56b3127be9083470bddc360e30377"
BRANCH="main"
COMMIT_ID_SHORT=$(echo "${COMMIT_ID}" | cut -c1-6)
ARCH=$(arch | sed 's/aarch64/arm64/g' | sed 's/x86_64/amd64/g')
mkdir -p $STARTUPDIR/recorder
wget -qO- https://kasmweb-build-artifacts.s3.amazonaws.com/kasm_recorder_service/${COMMIT_ID}/kasm_recorder_service_${ARCH}_${BRANCH}.${COMMIT_ID_SHORT}.tar.gz | tar -xvz -C $STARTUPDIR/recorder/
echo "${BRANCH}:${COMMIT_ID}" > $STARTUPDIR/recorder/kasm_recorder_service.version