diff options
-rwxr-xr-x | init-letsencrypt.sh | 5 | ||||
-rwxr-xr-x | init-recordings-bigbluebutton.sh | 33 | ||||
-rwxr-xr-x | init-recordings-scalelite.sh | 34 |
3 files changed, 72 insertions, 0 deletions
diff --git a/init-letsencrypt.sh b/init-letsencrypt.sh index bb623e2..21df2f0 100755 --- a/init-letsencrypt.sh +++ b/init-letsencrypt.sh @@ -5,6 +5,11 @@ if ! [ -x "$(command -v docker-compose)" ]; then exit 1 fi +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 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' diff --git a/init-recordings-scalelite.sh b/init-recordings-scalelite.sh new file mode 100755 index 0000000..5a5577d --- /dev/null +++ b/init-recordings-scalelite.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +echo 'Add the bigbluebutton user...' +useradd -m -d /home/bigbluebutton -s /bin/bash bigbluebutton +su - bigbluebutton -s /bin/bash -c 'mkdir ~/.ssh && touch ~/.ssh/authorized_keys' + +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 'Create the spool directory for recording transfer from BigBlueButton...' +mkdir -p /mnt/scalelite-recordings/var/bigbluebutton/spool +chown 1000:2000 /mnt/scalelite-recordings/var/bigbluebutton/spool +chmod 0775 /mnt/scalelite-recordings/var/bigbluebutton/spool +mkdir /var/bigbluebutton/ +ln -s /mnt/scalelite-recordings/var/bigbluebutton/spool /var/bigbluebutton/spool + +echo 'Create the temporary (working) directory for recording import...' +mkdir -p /mnt/scalelite-recordings/var/bigbluebutton/recording/scalelite +chown 1000:1000 /mnt/scalelite-recordings/var/bigbluebutton/recording/scalelite +chmod 0775 /mnt/scalelite-recordings/var/bigbluebutton/recording/scalelite + +echo 'Create the directory for published recordings...' +mkdir -p /mnt/scalelite-recordings/var/bigbluebutton/published +chown 1000:1000 /mnt/scalelite-recordings/var/bigbluebutton/published +chmod 0775 /mnt/scalelite-recordings/var/bigbluebutton/published + +echo 'Create the directory for unpublished recordings...' +mkdir -p /mnt/scalelite-recordings/var/bigbluebutton/unpublished +chown 1000:1000 /mnt/scalelite-recordings/var/bigbluebutton/unpublished +chmod 0775 /mnt/scalelite-recordings/var/bigbluebutton/unpublished + |