You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.6 KiB
46 lines
1.6 KiB
#!/usr/bin/with-contenv bash
|
|
|
|
if [[ -z $JIBRI_RECORDER_PASSWORD || -z $JIBRI_XMPP_PASSWORD ]]; then
|
|
echo 'FATAL ERROR: Jibri recorder password and auth password must be set'
|
|
exit 1
|
|
fi
|
|
|
|
OLD_JIBRI_RECORDER_PASSWORD=passw0rd
|
|
if [[ "$JIBRI_RECORDER_PASSWORD" == "$OLD_JIBRI_RECORDER_PASSWORD" ]]; then
|
|
echo 'FATAL ERROR: Jibri recorder password must be changed, check the README'
|
|
exit 1
|
|
fi
|
|
|
|
OLD_JIBRI_XMPP_PASSWORD=passw0rd
|
|
if [[ "$JIBRI_XMPP_PASSWORD" == "$OLD_JIBRI_XMPP_PASSWORD" ]]; then
|
|
echo 'FATAL ERROR: Jibri auth password must be changed, check the README'
|
|
exit 1
|
|
fi
|
|
|
|
# DISPLAY is necessary for start
|
|
[ -z "${DISPLAY}" ] \
|
|
&& ( echo -e "\e[31mERROR: Please set DISPLAY variable.\e[39m"; kill 1; exit 1 )
|
|
|
|
# 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}
|
|
|
|
# set random jibri nickname for the instance if is not set
|
|
[ -z "${JIBRI_INSTANCE_ID}" ] && export JIBRI_INSTANCE_ID="jibri-$(date +%N)"
|
|
|
|
# always recreate configs
|
|
tpl /defaults/jibri.conf > /etc/jitsi/jibri/jibri.conf
|
|
tpl /defaults/logging.properties > /etc/jitsi/jibri/logging.properties
|
|
tpl /defaults/xorg-video-dummy.conf > /etc/jitsi/jibri/xorg-video-dummy.conf
|
|
|
|
# make recording dir
|
|
[ -z "${JIBRI_RECORDING_DIR}" ] && export JIBRI_RECORDING_DIR=/config/recordings
|
|
mkdir -p ${JIBRI_RECORDING_DIR}
|
|
chown -R jibri ${JIBRI_RECORDING_DIR}
|
|
|
|
# make logs dir
|
|
JIBRI_LOGS_DIR=/config/logs
|
|
mkdir -p ${JIBRI_LOGS_DIR}
|
|
chown -R jibri ${JIBRI_LOGS_DIR}
|
|
|