summaryrefslogtreecommitdiff
path: root/init-recordings-bigbluebutton.sh
diff options
context:
space:
mode:
Diffstat (limited to 'init-recordings-bigbluebutton.sh')
-rwxr-xr-xinit-recordings-bigbluebutton.sh33
1 files changed, 33 insertions, 0 deletions
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'