mirror of
https://github.com/michelleDeko/scalelite-run.git
synced 2026-02-05 07:40:55 +01:00
updated scripts for initializing recordings
This commit is contained in:
@@ -120,7 +120,7 @@ services:
|
|||||||
- LOADBALANCER_SECRET=${LOADBALANCER_SECRET}
|
- LOADBALANCER_SECRET=${LOADBALANCER_SECRET}
|
||||||
- REDIS_URL=${REDIS_URL:-redis://redis:6379}
|
- REDIS_URL=${REDIS_URL:-redis://redis:6379}
|
||||||
- DATABASE_URL=${DATABASE_URL:-postgres://postgres:password@postgres:5432/scalelite?pool=5}
|
- DATABASE_URL=${DATABASE_URL:-postgres://postgres:password@postgres:5432/scalelite?pool=5}
|
||||||
- URL_HOST=${URL_HOST}
|
- RECORDING_DISABLED=${RECORDING_DISABLED-false}
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- postgres
|
||||||
- redis
|
- redis
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ else
|
|||||||
fi
|
fi
|
||||||
usermod -a -G scalelite-spool bigbluebutton
|
usermod -a -G scalelite-spool bigbluebutton
|
||||||
|
|
||||||
if [ -z "/home/bigbluebutton" ]
|
if [ -d "/home/bigbluebutton" ]
|
||||||
then
|
then
|
||||||
echo "Home Directory for <bigbluebutton> was found"
|
echo "Home Directory for <bigbluebutton> was found"
|
||||||
else
|
else
|
||||||
@@ -98,18 +98,35 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo 'Generate ssh key pair...'
|
echo 'Generate ssh key pair...'
|
||||||
su - bigbluebutton -s /bin/bash -c "ssh-keygen -t ed25519 -N '' -f ~/.ssh/id_rsa"
|
su - bigbluebutton -s /bin/bash -c "ssh-keygen -t ed25519 -N '' -f ~/.ssh/id_rsa" || true
|
||||||
|
|
||||||
|
echo 'Generate ssh config...'
|
||||||
|
if [ -f "/home/bigbluebutton/.ssh/config" ]; then
|
||||||
|
echo "file /home/bigbluebutton/.ssh/config exists"
|
||||||
|
rm /home/bigbluebutton/.ssh/config
|
||||||
|
fi
|
||||||
|
echo "Host scalelite-spool" | sudo tee -a /home/bigbluebutton/.ssh/config
|
||||||
|
echo " HostName $HOST" | sudo tee -a /home/bigbluebutton/.ssh/config
|
||||||
|
echo " User bigbluebutton" | sudo tee -a /home/bigbluebutton/.ssh/config
|
||||||
|
echo " IdentityFile /home/bigbluebutton/.ssh/id_rsa" | sudo tee -a /home/bigbluebutton/.ssh/config
|
||||||
|
|
||||||
echo 'Add recording transfer scripts...'
|
echo 'Add recording transfer scripts...'
|
||||||
cd /usr/local/bigbluebutton/core/scripts/post_publish
|
POST_PUBLISH_DIR=/usr/local/bigbluebutton/core/scripts/post_publish
|
||||||
rm scalelite_post_publish.rb
|
if [ -f "$POST_PUBLISH_DIR/scalelite_post_publish.rb" ]; then
|
||||||
wget -O post_publish_scalelite.rb https://raw.githubusercontent.com/blindsidenetworks/scalelite/master/bigbluebutton/scalelite_post_publish.rb
|
echo "file $POST_PUBLISH_DIR/scalelite_post_publish.rb exists"
|
||||||
|
rm $POST_PUBLISH_DIR/scalelite_post_publish.rb
|
||||||
|
fi
|
||||||
|
wget -O post_publish_scalelite.rb -P $POST_PUBLISH_DIR https://raw.githubusercontent.com/blindsidenetworks/scalelite/master/bigbluebutton/scalelite_post_publish.rb
|
||||||
|
|
||||||
echo 'Add recording transfer settings...'
|
echo 'Add recording transfer settings...'
|
||||||
cd /usr/local/bigbluebutton/core/scripts
|
CORE_SCRIPTS_DIR=/usr/local/bigbluebutton/core/scripts
|
||||||
rm scalelite.yml
|
if [ -f "$CORE_SCRIPTS_DIR/scalelite.yml" ]; then
|
||||||
wget https://raw.githubusercontent.com/blindsidenetworks/scalelite/master/bigbluebutton/scalelite.yml
|
echo "file $CORE_SCRIPTS_DIR/scalelite.yml exists"
|
||||||
echo "spool_dir: bigbluebutton@$HOST:/var/bigbluebutton/spool" | tee -a /usr/local/bigbluebutton/core/scripts/scalelite.yml
|
rm $CORE_SCRIPTS_DIR/scalelite.yml
|
||||||
|
fi
|
||||||
|
wget https://raw.githubusercontent.com/blindsidenetworks/scalelite/master/bigbluebutton/scalelite.yml -P $CORE_SCRIPTS_DIR
|
||||||
|
sed -e '/spool_dir/ s/^#*/#/' -i $CORE_SCRIPTS_DIR/scalelite.yml
|
||||||
|
echo "spool_dir: bigbluebutton@sl-spool:/var/bigbluebutton/spool" | tee -a $CORE_SCRIPTS_DIR/scalelite.yml
|
||||||
|
|
||||||
public_key=$(cat /home/bigbluebutton/.ssh/id_rsa.pub)
|
public_key=$(cat /home/bigbluebutton/.ssh/id_rsa.pub)
|
||||||
set +x
|
set +x
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
source ./.env
|
||||||
|
SCALELITE_RECORDING_DIR=${SCALELITE_RECORDING_DIR-/mnt/scalelite-recordings/var/bigbluebutton}
|
||||||
|
SCALELITE_RECORDING_DIR_ROOT=$(dirname $(dirname $SCALELITE_RECORDING_DIR))
|
||||||
|
|
||||||
echo 'Add the bigbluebutton user...'
|
echo 'Add the bigbluebutton user...'
|
||||||
useradd -m -d /home/bigbluebutton -s /bin/bash bigbluebutton
|
useradd -m -d /home/bigbluebutton -s /bin/bash bigbluebutton
|
||||||
su - bigbluebutton -s /bin/bash -c 'mkdir ~/.ssh && touch ~/.ssh/authorized_keys'
|
su - bigbluebutton -s /bin/bash -c 'mkdir ~/.ssh && touch ~/.ssh/authorized_keys'
|
||||||
@@ -10,16 +14,13 @@ groupadd -g 2000 scalelite-spool
|
|||||||
echo 'Add the bigbluebutton user to the group...'
|
echo 'Add the bigbluebutton user to the group...'
|
||||||
usermod -a -G scalelite-spool bigbluebutton
|
usermod -a -G scalelite-spool bigbluebutton
|
||||||
|
|
||||||
echo 'Create the directory structure for storing recording ...'
|
echo 'Create the directory structure for recording ...'
|
||||||
mkdir -p /var/bigbluebutton/spool
|
mkdir -p $SCALELITE_RECORDING_DIR_ROOT/var/bigbluebutton/spool
|
||||||
mkdir -p /var/bigbluebutton/recording/scalelite
|
mkdir -p $SCALELITE_RECORDING_DIR_ROOT/var/bigbluebutton/recording/scalelite
|
||||||
mkdir -p /var/bigbluebutton/published
|
mkdir -p $SCALELITE_RECORDING_DIR_ROOT/var/bigbluebutton/published
|
||||||
mkdir -p /var/bigbluebutton/unpublished
|
mkdir -p $SCALELITE_RECORDING_DIR_ROOT/var/bigbluebutton/unpublished
|
||||||
chown -R 1000:2000 /var/bigbluebutton/
|
chown -R 1000:2000 $SCALELITE_RECORDING_DIR_ROOT/
|
||||||
chmod -R 0775 /var/bigbluebutton/
|
chmod -R 0775 $SCALELITE_RECORDING_DIR_ROOT/
|
||||||
|
|
||||||
echo 'Create the mouniting point directory for recording transfer from BigBlueButton...'
|
echo 'Create symbolic link to the directory structure for uploading ...'
|
||||||
mkdir -p /mnt/scalelite-recordings/var
|
ln -s $SCALELITE_RECORDING_DIR_ROOT/var/bigbluebutton /var/bigbluebutton
|
||||||
chown -R 1000:2000 /mnt/scalelite-recordings/
|
|
||||||
chmod -R 0775 /mnt/scalelite-recordings/
|
|
||||||
ln -s /var/bigbluebutton /mnt/scalelite-recordings/var/bigbluebutton
|
|
||||||
|
|||||||
Reference in New Issue
Block a user