mirror of
https://github.com/michelleDeko/scalelite-run.git
synced 2026-02-05 07:40:55 +01:00
updates to init-recordings-bigbluebutton make ssh port variable
This commit is contained in:
@@ -7,17 +7,23 @@ Script for integrating BigBlueButton Recordings with Scaleite.
|
|||||||
USAGE:
|
USAGE:
|
||||||
wget -qO- https://raw.githubusercontent.com/jfederico/scalelite-run/master/init-recordings-bigbluebutton.sh | bash -s -- [OPTIONS]
|
wget -qO- https://raw.githubusercontent.com/jfederico/scalelite-run/master/init-recordings-bigbluebutton.sh | bash -s -- [OPTIONS]
|
||||||
OPTIONS
|
OPTIONS
|
||||||
-s <scalelite-hostname> Configure server with <scalelite-hostname> (required)
|
-h <scalelite-hostname> Configure server with <scalelite-hostname> (required)
|
||||||
|
-u <scalelite-username> Scalelite username <scalelite-username> (optional)
|
||||||
|
-p <scalelite-ssh-port> SSH port in Scalelite server <scalelite-ssh-port> (optional)
|
||||||
|
-r <scalelite-ssh-port> File wiht id_rsa private key to be used to ssh into Scalelite server <scalelite-id_rsa> (optional)
|
||||||
EXAMPLES:
|
EXAMPLES:
|
||||||
Sample options for setup a BigBlueButton server
|
Sample options for setup a BigBlueButton server
|
||||||
-s scalelite.example.com
|
-s scalelite.example.com
|
||||||
|
-s scalelite.example.com -u scalelite
|
||||||
|
-s scalelite.example.com -u scalelite -p 2222
|
||||||
|
-s scalelite.example.com -u scalelite -p 2222 -r id_rsa-example
|
||||||
HERE
|
HERE
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
while builtin getopts "s:" opt "${@}"; do
|
while builtin getopts "s:u:p" opt "${@}"; do
|
||||||
|
|
||||||
case $opt in
|
case $opt in
|
||||||
s)
|
s)
|
||||||
@@ -26,6 +32,16 @@ main() {
|
|||||||
err "You must specify a valid hostname (not the hostname given in the docs)."
|
err "You must specify a valid hostname (not the hostname given in the docs)."
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
u)
|
||||||
|
USER=$OPTARG
|
||||||
|
;;
|
||||||
|
p)
|
||||||
|
PORT=$OPTARG
|
||||||
|
;;
|
||||||
|
r)
|
||||||
|
ID_RSA=$OPTARG
|
||||||
|
;;
|
||||||
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
done
|
done
|
||||||
@@ -107,9 +123,9 @@ if [ -f "/home/bigbluebutton/.ssh/config" ]; then
|
|||||||
fi
|
fi
|
||||||
echo "Host scalelite-spool" | sudo tee -a /home/bigbluebutton/.ssh/config
|
echo "Host scalelite-spool" | sudo tee -a /home/bigbluebutton/.ssh/config
|
||||||
echo " HostName $HOST" | 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 " User ${USER:-bigbluebutton}" | sudo tee -a /home/bigbluebutton/.ssh/config
|
||||||
echo " Port 22" | sudo tee -a /home/bigbluebutton/.ssh/config
|
echo " Port ${PORT:-22}" | sudo tee -a /home/bigbluebutton/.ssh/config
|
||||||
echo " IdentityFile /home/bigbluebutton/.ssh/id_rsa" | sudo tee -a /home/bigbluebutton/.ssh/config
|
echo " IdentityFile /home/bigbluebutton/.ssh/${ID_RSA:-id_rsa}" | sudo tee -a /home/bigbluebutton/.ssh/config
|
||||||
chown bigbluebutton.bigbluebutton /home/bigbluebutton/.ssh/config
|
chown bigbluebutton.bigbluebutton /home/bigbluebutton/.ssh/config
|
||||||
|
|
||||||
echo 'Add recording transfer scripts...'
|
echo 'Add recording transfer scripts...'
|
||||||
@@ -129,7 +145,7 @@ fi
|
|||||||
wget https://raw.githubusercontent.com/blindsidenetworks/scalelite/master/bigbluebutton/scalelite.yml -P $CORE_SCRIPTS_DIR
|
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
|
sed -e '/spool_dir/ s/^#*/#/' -i $CORE_SCRIPTS_DIR/scalelite.yml
|
||||||
sed -e '/extra_rsync_opts/ s/^#*/#/' -i $CORE_SCRIPTS_DIR/scalelite.yml
|
sed -e '/extra_rsync_opts/ s/^#*/#/' -i $CORE_SCRIPTS_DIR/scalelite.yml
|
||||||
echo 'spool_dir: bigbluebutton@scalelite-spool:/var/bigbluebutton/spool' | tee -a $CORE_SCRIPTS_DIR/scalelite.yml
|
echo 'spool_dir: scalelite-spool:/var/bigbluebutton/spool' | tee -a $CORE_SCRIPTS_DIR/scalelite.yml
|
||||||
echo 'extra_rsync_opts: ["-av", "--no-owner", "--chmod=F664"]' | tee -a $CORE_SCRIPTS_DIR/scalelite.yml
|
echo 'extra_rsync_opts: ["-av", "--no-owner", "--chmod=F664"]' | 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)
|
||||||
|
|||||||
Reference in New Issue
Block a user