From 11d9cab98de35f7c87fa808c82098daa809975e9 Mon Sep 17 00:00:00 2001 From: jfederico Date: Wed, 25 Nov 2020 22:35:59 -0500 Subject: added script for init recordings on bigbluebutton and scalelite --- init-recordings-bigbluebutton.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 init-recordings-bigbluebutton.sh (limited to 'init-recordings-bigbluebutton.sh') diff --git a/init-recordings-bigbluebutton.sh b/init-recordings-bigbluebutton.sh new file mode 100755 index 0000000..58a0381 --- /dev/null +++ b/init-recordings-bigbluebutton.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +if [[ ! -f ./.env ]]; then + echo ".env file does not exist on your filesystem." + exit 1 +fi + +URL_HOST=$(grep URL_HOST .env | cut -d '=' -f2) +echo $URL_HOST + +echo 'Create a new group with GID 2000...' +groupadd -g 2000 scalelite-spool +echo 'Add the bigbluebutton user to the group...' +usermod -a -G scalelite-spool bigbluebutton + +echo 'Add recording transfer scripts...' +cd /usr/local/bigbluebutton/core/scripts/post_publish +wget -O post_publish_scalelite.rb https://raw.githubusercontent.com/blindsidenetworks/scalelite/master/bigbluebutton/scalelite_post_publish.rb + +echo 'Add recording transfer settings...' +cd /usr/local/bigbluebutton/core/scripts +wget https://raw.githubusercontent.com/blindsidenetworks/scalelite/master/bigbluebutton/scalelite.yml +echo "spool_dir: bigbluebutton@$URL_HOST:/var/bigbluebutton/spool" | tee -a /usr/local/bigbluebutton/core/scripts + +echo 'Generate ssh key pair...' +mkdir /home/bigbluebutton +chown bigbluebutton.bigbluebutton /home/bigbluebutton/ +su - bigbluebutton -s /bin/bash -c "ssh-keygen -t ed25519 -N '' -f ~/.ssh/id_rsa" + +echo 'Add this key to /home/bigbluebutton/.ssh/authorized_keys in scalelite:' +cat /home/bigbluebutton/.ssh/scalelite.pub + +echo 'done' -- cgit v1.2.3