quick_jibri_installer.sh: start migration to configure via patches. (#116)
Reviewed-on: #116 Co-authored-by: Ark74 <ark@switnet.org> Co-committed-by: Ark74 <ark@switnet.org>
This commit is contained in:
parent
b9b5d2e326
commit
0a7fd8dfd9
|
@ -0,0 +1,66 @@
|
||||||
|
# Quick Jibri Installer - *buntu (LTS) based systems.
|
||||||
|
# SwITNet Ltd © - 2024, https://switnet.net/
|
||||||
|
# GPLv3 or later.
|
||||||
|
|
||||||
|
Patch jitsi-meet config.js to enable recording and livestreaming by default.
|
||||||
|
|
||||||
|
diff --git a/etc/jitsi/meet/${DOMAIN}-config.js b/etc/jitsi/meet/${DOMAIN}-config.js
|
||||||
|
index dcb860b..8f64c7c 100644
|
||||||
|
--- a/etc/jitsi/meet/${DOMAIN}-config.js
|
||||||
|
+++ b/etc/jitsi/meet/${DOMAIN}-config.js
|
||||||
|
@@ -343,12 +343,12 @@ var config = {
|
||||||
|
// // showPrejoinWarning: true,
|
||||||
|
// },
|
||||||
|
|
||||||
|
- // recordingService: {
|
||||||
|
+ recordingService: {
|
||||||
|
// // When integrations like dropbox are enabled only that will be shown,
|
||||||
|
// // by enabling fileRecordingsServiceEnabled, we show both the integrations
|
||||||
|
// // and the generic recording service (its configuration and storage type
|
||||||
|
// // depends on jibri configuration)
|
||||||
|
- // enabled: false,
|
||||||
|
+ enabled: true,
|
||||||
|
|
||||||
|
// // Whether to show the possibility to share file recording with other people
|
||||||
|
// // (e.g. meeting participants), based on the actual implementation
|
||||||
|
@@ -357,7 +357,7 @@ var config = {
|
||||||
|
|
||||||
|
// // Hide the warning that says we only store the recording for 24 hours.
|
||||||
|
// hideStorageWarning: false,
|
||||||
|
- // },
|
||||||
|
+ },
|
||||||
|
|
||||||
|
// DEPRECATED. Use recordingService.enabled instead.
|
||||||
|
// fileRecordingsServiceEnabled: false,
|
||||||
|
@@ -368,7 +368,7 @@ var config = {
|
||||||
|
// Local recording configuration.
|
||||||
|
// localRecording: {
|
||||||
|
// // Whether to disable local recording or not.
|
||||||
|
- // disable: false,
|
||||||
|
+ // disable: true,
|
||||||
|
|
||||||
|
// // Whether to notify all participants when a participant is recording locally.
|
||||||
|
// notifyAllParticipants: false,
|
||||||
|
@@ -378,9 +378,9 @@ var config = {
|
||||||
|
// },
|
||||||
|
|
||||||
|
// Customize the Live Streaming dialog. Can be modified for a non-YouTube provider.
|
||||||
|
- // liveStreaming: {
|
||||||
|
+ liveStreaming: {
|
||||||
|
// // Whether to enable live streaming or not.
|
||||||
|
- // enabled: false,
|
||||||
|
+ enabled: true,
|
||||||
|
// // Terms link
|
||||||
|
// termsLink: 'https://www.youtube.com/t/terms',
|
||||||
|
// // Data privacy link
|
||||||
|
@@ -388,8 +388,8 @@ var config = {
|
||||||
|
// // RegExp string that validates the stream key input field
|
||||||
|
// validatorRegExpString: '^(?:[a-zA-Z0-9]{4}(?:-(?!$)|$)){4}',
|
||||||
|
// // Documentation reference for the live streaming feature.
|
||||||
|
- // helpLink: 'https://jitsi.org/live'
|
||||||
|
- // },
|
||||||
|
+ helpLink: 'https://forge.switnet.net/switnet/quick-jibri-installer'
|
||||||
|
+ },
|
||||||
|
|
||||||
|
// DEPRECATED. Use liveStreaming.enabled instead.
|
||||||
|
// liveStreamingEnabled: false,
|
|
@ -0,0 +1,31 @@
|
||||||
|
# Quick Jibri Installer - *buntu (LTS) based systems.
|
||||||
|
# SwITNet Ltd © - 2024, https://switnet.net/
|
||||||
|
# GPLv3 or later.
|
||||||
|
|
||||||
|
Patch jitsi-meet config.js to enable/disable welcome page.
|
||||||
|
|
||||||
|
diff --git a/etc/jitsi/meet/${DOMAIN}-config.js b/etc/jitsi/meet/${DOMAIN}-config.js
|
||||||
|
index dcb860b..2094287 100644
|
||||||
|
--- a/etc/jitsi/meet/${DOMAIN}-config.js
|
||||||
|
+++ b/etc/jitsi/meet/${DOMAIN}-config.js
|
||||||
|
@@ -664,13 +664,13 @@ var config = {
|
||||||
|
// enableWelcomePage: true,
|
||||||
|
|
||||||
|
// Configs for welcome page.
|
||||||
|
- // welcomePage: {
|
||||||
|
- // // Whether to disable welcome page. In case it's disabled a random room
|
||||||
|
- // // will be joined when no room is specified.
|
||||||
|
- // disabled: false,
|
||||||
|
- // // If set, landing page will redirect to this URL.
|
||||||
|
- // customUrl: ''
|
||||||
|
- // },
|
||||||
|
+ welcomePage: {
|
||||||
|
+ // Whether to disable welcome page. In case it's disabled a random room
|
||||||
|
+ // will be joined when no room is specified.
|
||||||
|
+ disabled: ${ENABLE_WELCP_BOL},
|
||||||
|
+ // If set, landing page will redirect to this URL.
|
||||||
|
+ customUrl: ''
|
||||||
|
+ },
|
||||||
|
|
||||||
|
// Configs for the lobby screen.
|
||||||
|
// lobby: {
|
|
@ -546,6 +546,7 @@ JIBRI_XORG_CONF="/etc/jitsi/jibri/xorg-video-dummy.conf"
|
||||||
WS_MATCH1="# ensure all static content can always be found first"
|
WS_MATCH1="# ensure all static content can always be found first"
|
||||||
WS_MATCH2="external_api.js"
|
WS_MATCH2="external_api.js"
|
||||||
MEET_MATCH1="disable simulcast support."
|
MEET_MATCH1="disable simulcast support."
|
||||||
|
export DOMAIN
|
||||||
|
|
||||||
# Make sure we can rely on the match strings.
|
# Make sure we can rely on the match strings.
|
||||||
printf "> Testing match strings on config files.\n"
|
printf "> Testing match strings on config files.\n"
|
||||||
|
@ -853,20 +854,16 @@ BREWERY
|
||||||
# Jibri tweaks for /etc/jitsi/meet/$DOMAIN-config.js
|
# Jibri tweaks for /etc/jitsi/meet/$DOMAIN-config.js
|
||||||
sed -i "s|conference.$DOMAIN|internal.auth.$DOMAIN|" "$MEET_CONF"
|
sed -i "s|conference.$DOMAIN|internal.auth.$DOMAIN|" "$MEET_CONF"
|
||||||
|
|
||||||
#Enable recording by default.
|
#Enable recording & livestreaming by default.
|
||||||
sed -i "s|// recordingService:|recordingService:|" "$MEET_CONF"
|
echo "> Patching config.js to enable recording and livestreaming by default..."
|
||||||
sed -i "/recordingService/,/hideStorageWarning/s|// enabled: false,| enabled: true,|" "$MEET_CONF"
|
echo " Read more about patches at the patches folder."
|
||||||
sed -i "/hideStorageWarning: false/,/}/s|// },|},|" "$MEET_CONF"
|
envsubst < \
|
||||||
|
patches/jitsi-meet/001-jitsi-meet-enable-livestreaming-and-recording.patch | \
|
||||||
|
patch --no-backup-if-mismatch -d / -p1
|
||||||
|
|
||||||
#Prepare hidden domain for jibri/jigasi silent users.
|
#Prepare hidden domain for jibri/jigasi silent users.
|
||||||
sed -i "/fileRecordingsServiceEnabled: false,/a \\
|
sed -i "/fileRecordingsServiceEnabled: false,/a \\
|
||||||
hiddenDomain: \'recorder.$DOMAIN\'," "$MEET_CONF"
|
hiddenDomain: \'recorder.$DOMAIN\'," "$MEET_CONF"
|
||||||
|
|
||||||
#Enable livestreaming by default.
|
|
||||||
sed -i "s|// liveStreaming:|liveStreaming:|" "$MEET_CONF"
|
|
||||||
sed -i "/liveStreaming:/,/helpLink:/s|// enabled: false,| enabled: true,|" "$MEET_CONF"
|
|
||||||
sed -i "s|// helpLink:| helpLink:|" "$MEET_CONF"
|
|
||||||
sed -i "/helpLink:/,/}/s|// },|},|" "$MEET_CONF"
|
|
||||||
|
|
||||||
# Recording directory
|
# Recording directory
|
||||||
if [ ! -d "$DIR_RECORD" ]; then
|
if [ ! -d "$DIR_RECORD" ]; then
|
||||||
mkdir "$DIR_RECORD"
|
mkdir "$DIR_RECORD"
|
||||||
|
@ -1047,22 +1044,23 @@ fi
|
||||||
sed -i "s|// startWithVideoMuted: false,|startWithVideoMuted: true,|" "$MEET_CONF"
|
sed -i "s|// startWithVideoMuted: false,|startWithVideoMuted: true,|" "$MEET_CONF"
|
||||||
|
|
||||||
#Start with audio muted but admin
|
#Start with audio muted but admin
|
||||||
sed -i "s|// startAudioMuted: 10,|startAudioMuted: 1,|" "$MEET_CONF"
|
sed -i "s|// startAudioMuted: 10,|startAudioMuted: 2,|" "$MEET_CONF"
|
||||||
|
|
||||||
#Disable/enable welcome page
|
#Disable/enable welcome page
|
||||||
if [ "$ENABLE_WELCP" = "yes" ]; then
|
[ "$ENABLE_WELCP" = "yes" ] && ENABLE_WELCP_BOL=true
|
||||||
sed -i "/ welcomePage: {/,/},/s|// ||" "$MEET_CONF"
|
[ "$ENABLE_WELCP" = "no" ] && ENABLE_WELCP_BOL=false
|
||||||
sed -i "/ welcomePage: {/,/},/s|disabled: .*,|disabled: true,|" "$MEET_CONF"
|
export ENABLE_WELCP_BOL
|
||||||
elif [ "$ENABLE_WELCP" = "no" ]; then
|
echo "> Patching config.js to modify welcompage behavior..."
|
||||||
sed -i "/ welcomePage: {/,/},/s|// ||" "$MEET_CONF"
|
echo " Read more about patches at the patches folder."
|
||||||
sed -i "/ welcomePage: {/,/},/s|disabled: .*,|disabled: false,|" "$MEET_CONF"
|
envsubst < \
|
||||||
fi
|
patches/jitsi-meet/002-jitsi-meet-welcome-page-on-off.patch | \
|
||||||
|
patch --no-backup-if-mismatch -d / -p1
|
||||||
|
|
||||||
#Enable close page
|
#Enable close page
|
||||||
if [ "$ENABLE_CLOCP" = "yes" ]; then
|
[ "$ENABLE_CLOCP" = "yes" ] && \
|
||||||
sed -i "s|.*enableClosePage:.*| enableClosePage: true,|" "$MEET_CONF"
|
sed -i "s|// enableClosePage:.*|enableClosePage: true,|" "$MEET_CONF"
|
||||||
elif [ "$ENABLE_CLOCP" = "no" ]; then
|
[ "$ENABLE_CLOCP" = "no" ] && \
|
||||||
sed -i "s|.*enableClosePage:.*| enableClosePage: false,|" "$MEET_CONF"
|
sed -i "s|// enableClosePage:.*|enableClosePage: false,|" "$MEET_CONF"
|
||||||
fi
|
|
||||||
|
|
||||||
#Add pre-join screen by default, since it improves YouTube autoplay capabilities
|
#Add pre-join screen by default, since it improves YouTube autoplay capabilities
|
||||||
#pre-join screen by itself don't require autorization by moderator, don't confuse with lobby which does.
|
#pre-join screen by itself don't require autorization by moderator, don't confuse with lobby which does.
|
||||||
|
|
Loading…
Reference in New Issue