42 lines
1.8 KiB
Bash
42 lines
1.8 KiB
Bash
#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
|
|
mv -f /tmp/chromedriver /usr/local/bin/chromedriver > $OUTPUT 2>&1
|
|
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
|
|
modprobe snd_aloop > $OUTPUT 2>&1
|
|
|
|
##config dns
|
|
printf '%s\n' '#Internal dns server' "nameserver $intip" '#Other dns server(s)' > /etc/resolvconf/resolv.conf.d/head
|
|
sed -i -e '/hosts:/c\\hosts: files mdns4_minimal dns' /etc/nsswitch.conf
|
|
|
|
#config jibri
|
|
systemctl stop jibri
|
|
curl --retry 7 --retry-delay 5 -s "$mrepo"/raw/branch/"$mbranch"/conf/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
|
|
systemctl enable jibri > $OUTPUT 2>&1
|
|
systemctl start jibri > $OUTPUT 2>&1
|
|
|