From a7fb101e2c8b781b6a89c1883b33d6730ef8bfab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Fri, 18 Dec 2020 09:30:21 +0100 Subject: [PATCH] jibri: don't provide a non-existing finalizer path --- env.example | 2 +- jibri/rootfs/defaults/config.json | 2 ++ jibri/rootfs/etc/cont-init.d/10-config | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/env.example b/env.example index 5b62e08..c04292d 100644 --- a/env.example +++ b/env.example @@ -333,7 +333,7 @@ JIBRI_RECORDER_USER=recorder JIBRI_RECORDING_DIR=/config/recordings # The finalizing script. Will run after recording is complete -JIBRI_FINALIZE_RECORDING_SCRIPT_PATH=/config/finalize.sh +#JIBRI_FINALIZE_RECORDING_SCRIPT_PATH=/config/finalize.sh # XMPP user for Jibri client connections JIBRI_XMPP_USER=jibri diff --git a/jibri/rootfs/defaults/config.json b/jibri/rootfs/defaults/config.json index a455cfd..9b55432 100644 --- a/jibri/rootfs/defaults/config.json +++ b/jibri/rootfs/defaults/config.json @@ -1,7 +1,9 @@ { "recording_directory":"{{ .Env.JIBRI_RECORDING_DIR }}", // The path to the script which will be run on completed recordings +{{ if .Env.JIBRI_FINALIZE_RECORDING_SCRIPT_PATH -}} "finalize_recording_script_path": "{{ .Env.JIBRI_FINALIZE_RECORDING_SCRIPT_PATH }}", +{{ end -}} "xmpp_environments": [ { // A friendly name for this environment which can be used diff --git a/jibri/rootfs/etc/cont-init.d/10-config b/jibri/rootfs/etc/cont-init.d/10-config index 22891aa..7ba0134 100644 --- a/jibri/rootfs/etc/cont-init.d/10-config +++ b/jibri/rootfs/etc/cont-init.d/10-config @@ -39,6 +39,7 @@ usermod -aG ${host_audio_group} jibri # script for finalizing must have executing bit. [ ! -z "${JIBRI_FINALIZE_RECORDING_SCRIPT_PATH}" ] \ +&& [ -f "${JIBRI_FINALIZE_RECORDING_SCRIPT_PATH}" ] \ && [ ! -x "${JIBRI_FINALIZE_RECORDING_SCRIPT_PATH}" ] \ && chmod +x ${JIBRI_FINALIZE_RECORDING_SCRIPT_PATH}