31 lines
1.3 KiB
Bash
31 lines
1.3 KiB
Bash
################################
|
|
# JitsiMeet - JMS_FSA > SA #
|
|
################################
|
|
#Vars
|
|
repo=https://git.ictmaatwerk.com/VPS-scripts/MeetServer
|
|
branch=main/JMS
|
|
branchtype=branch
|
|
source /etc/ICTM/JitsiMeet.var
|
|
|
|
#Menu
|
|
ip -4 addr list
|
|
read -p 'Enter full name of internal network interface: ' innetworkif
|
|
intip=$(ip -o -4 addr list "$innetworkif" | awk '{print $4}' | cut -d/ -f1)
|
|
declare -p intip | cut -d ' ' -f 3- >> /etc/ICTM/JitsiMeet.var
|
|
|
|
#Firewall
|
|
apt install -y --no-install-recommends dnsmasq
|
|
ufw allow in on "$innetworkif" to any port 53
|
|
ufw allow in on "$innetworkif" to any port 5222
|
|
ufw reload
|
|
|
|
#InternalDNS
|
|
systemctl stop dnsmasq
|
|
curl --retry 7 --retry-delay 5 -s "$mrepo"/raw/branch/"$mbranch"/conf/dnsmasq.conf -o /etc/dnsmasq.d/main.conf
|
|
sed -i -e 's/DOMAINname/'$domain'/g' -e 's/HOSTname/'${domain%%.*}'/g' -e 's/INTif/'$innetworkif'/g' -e 's/INTip/'$intip'/g' /etc/dnsmasq.d/main.conf
|
|
systemctl enable dnsmasq
|
|
systemctl start dnsmasq
|
|
|
|
#UI Record Toggles
|
|
echo "sed -i -e '/fileRecordingsEnabled/c\fileRecordingsEnabled: true,' /etc/jitsi/meet/"$domain"-config.js" > /opt/EnableJitsiRecordButton.sh
|
|
echo "sed -i -e '/fileRecordingsEnabled/c\fileRecordingsEnabled: false,' /etc/jitsi/meet/"$domain"-config.js" > /opt/DisableJitsiRecordButton.sh |