Inital commit

This commit is contained in:
2020-10-22 16:47:36 +02:00
commit bc77502b0d
16 changed files with 795 additions and 0 deletions

38
JIB/conf.sh Normal file
View File

@@ -0,0 +1,38 @@
#module setup
mrepo=https://git.ictmaatwerk.com/VPS-scripts/MeetServer
mbranch=main/JIB
#config ssh
sed -i -e '/Port 22/c\Port 4242' -e 's/PermitRootLogin yes/PermitRootLogin prohibit-password/g' /etc/ssh/sshd_config
systemctl restart sshd > $OUTPUT 2>&1
##config ufw
ufw limit 4242/tcp > $OUTPUT 2>&1
echo "y" | ufw enable > $OUTPUT 2>&1
#install ChromeDriver
curl --retry 7 --retry-delay 5 -s http://chromedriver.storage.googleapis.com/"$(curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE)"/chromedriver_linux64.zip -o /tmp/chromedriver.zip
unzip /tmp/chromedriver.zip -d /tmp > $OUTPUT 2>&1
sudo mv -f /tmp/chromedriver /usr/local/bin/chromedriver > $OUTPUT 2>&1
sudo chmod 0755 /usr/local/bin/chromedriver > $OUTPUT 2>&1
#config chrome
mkdir -p /etc/opt/chrome/policies/managed > $OUTPUT 2>&1
echo '{ "CommandLineFlagSecurityWarningsEnabled": false }' >>/etc/opt/chrome/policies/managed/managed_policies.json
#config alsa
echo "snd_aloop" >> /etc/modules > $OUTPUT 2>&1
modprobe snd_aloop > $OUTPUT 2>&1
##config dns
mv /etc/resolve.conf /etc/resolve.conf.bck > $OUTPUT 2>&1
echo "nameserver $intip" > /etc/resolve.conf
#config jibri
curl --retry 7 --retry-delay 5 -s "$mrepo"/raw/branch/"$mbranch"/config/config.json -o /etc/jitsi/jibri/config.json
sed -i -e 's/DOMAINname/'$domain'/g' -e 's/JIBRIname/'$jibinstid'/g' -e 's/RECsecret/'$jibrsec'/g' -e 's/JIBRIsecret/'$jibsec'/g' /etc/jitsi/jibri/config.json
usermod -aG adm,audio,video,plugdev jibri > $OUTPUT 2>&1
mkdir /recordings > $OUTPUT 2>&1
chown jibri:jibri /recordings > $OUTPUT 2>&1
sed -i "s=exec java=exec /usr/lib/jvm/adoptopenjdk-8-hotspot-amd64/bin/java=g" /opt/jitsi/jibri/launch.sh

29
JIB/conf/config.json Normal file
View File

@@ -0,0 +1,29 @@
{
"recording_directory": "/recordings",
"finalize_recording_script_path": "",
"xmpp_environments": [
{
"name": "prod environment",
"xmpp_server_hosts": ["DOMAINname"],
"xmpp_domain": "DOMAINname",
"control_login": {
"domain": "auth.DOMAINname",
"username": "jibri",
"password": "JIBRIsecret"
},
"control_muc": {
"domain": "internal.auth.DOMAINname",
"room_name": "JibriBrewery",
"nickname": "JIBRIname"
},
"call_login": {
"domain": "recorder.DOMAINname",
"username": "recorder",
"password": "RECsecret"
},
"room_jid_domain_string_to_strip_from_start": "conference.",
"usage_timeout": "0"
}
]
}

1
JIB/generic.pkg.list Normal file
View File

@@ -0,0 +1 @@
jibri google-chrome-stable ffmpeg openjdk-11-jre-headless adoptopenjdk-8-hotspot ufw unzip

12
JIB/preconf.sh Normal file
View File

@@ -0,0 +1,12 @@
#module setup
mrepo=https://git.ictmaatwerk.com/VPS-scripts/MeetServer
mbranch=main/JIB
#setup repo
curl --retry 7 --retry-delay 5 -s https://git.ictmaatwerk.com/VPS-scripts/General/raw/branch/Main/Setup-Repo.sh |repo=jitsi osrel=$shortdist bash > $OUTPUT 2>&1
curl --retry 7 --retry-delay 5 -s https://git.ictmaatwerk.com/VPS-scripts/General/raw/branch/Main/Setup-Repo.sh |repo=GoogleChrome osrel=$shortdist bash > $OUTPUT 2>&1
curl --retry 7 --retry-delay 5 -s https://git.ictmaatwerk.com/VPS-scripts/General/raw/branch/Main/Setup-Repo.sh |repo=adoptopenjdk osrel=$shortdist bash > $OUTPUT 2>&1
##preconf jitsi
debconf-set-selections <<< "jitsi-videobridge2 jitsi-videobridge/jvb-hostname string $domain" > $OUTPUT 2>&1
debconf-set-selections <<< "jitsi-meet-prosody jitsi-videobridge/jvbsecret password $jvbsec" > $OUTPUT 2>&1