@@ -302,9 +302,9 @@ main() {
302302
303303 get_IP " $HOST "
304304
305-
306- need_pkg wget curl gpg-agent dirmngr apparmor-utils ca-certificates yq ruby apt-transport-https haveged openjdk-17-jre dnsutils
307305 # need_ppa martin-uni-mainz-ubuntu-coturn-noble.list ppa:martin-uni-mainz/coturn 4B77C2225D3BBDB3 # Coturn
306+ # need_ppa martin-uni-mainz-ubuntu-yq-go-noble.list ppa:martin-uni-mainz/yq-go 4B77C2225D3BBDB3 # Edit yaml files with debian's yq-go (mikefarah/yq syntax BBB 3.0 used rather than kislyuk syntax used by the yq tool included in Ubuntu 24.04)
307+ need_pkg wget curl gpg-agent dirmngr apparmor-utils ca-certificates ruby apt-transport-https haveged openjdk-17-jre dnsutils bbb-yq-go
308308
309309 if [ ! -f /etc/apt/sources.list.d/nodesource.list ]; then
310310 sudo mkdir -p /etc/apt/keyrings
@@ -680,14 +680,15 @@ need_pkg() {
680680
681681need_ppa () {
682682 need_pkg software-properties-common
683- if [ ! -f " /etc/apt/sources.list.d/$1 " ]; then
683+ # On Ubuntu 24.04, add-apt-repository writes a deb822 *.sources file and keeps the PPA
684+ # signing key in its own keyring. apt-key is deprecated and its keyring is empty on noble,
685+ # so gate on the sources file add-apt-repository creates instead of `apt-key list "$3"`.
686+ local base=" /etc/apt/sources.list.d/${1% .list} "
687+ if [ ! -f " $base .sources" ] && [ ! -f " $base .list" ]; then
684688 LC_CTYPE=C.UTF-8 add-apt-repository -y " $2 "
685689 fi
686- if ! apt-key list " $3 " | grep -q -E " 1024|4096" ; then # Let's try it a second time
687- LC_CTYPE=C.UTF-8 add-apt-repository " $2 " -y
688- if ! apt-key list " $3 " | grep -q -E " 1024|4096" ; then
689- err " Unable to setup PPA for $2 "
690- fi
690+ if [ ! -f " $base .sources" ] && [ ! -f " $base .list" ]; then
691+ err " Unable to setup PPA for $2 "
691692 fi
692693}
693694
17571758 sed -i ' s/^bigbluebutton.web.serverURL=http:/bigbluebutton.web.serverURL=https:/g' " $BBB_WEB_ETC_CONFIG "
17581759 fi
17591760
1760- yq -y -i ' .playback_protocol = "https"' /usr/local/bigbluebutton/core/scripts/bigbluebutton.yml
1761+ yq-go e -i ' .playback_protocol = "https"' /usr/local/bigbluebutton/core/scripts/bigbluebutton.yml
17611762 chmod 644 /usr/local/bigbluebutton/core/scripts/bigbluebutton.yml
17621763
17631764 # Update Greenlight (if installed) to use SSL
@@ -1779,29 +1780,29 @@ fi
17791780 TARGET=/etc/bigbluebutton/bbb-webrtc-sfu/production.yml
17801781 touch $TARGET
17811782
1782- yq -y -i " .freeswitch.ip = \" $IP \" " $TARGET
1783+ yq-go e -i " .freeswitch.ip = \" $IP \" " $TARGET
17831784
17841785 if [[ $BIGBLUEBUTTON_RELEASE == 2.2.* ]] && [[ ${BIGBLUEBUTTON_RELEASE#* .* .} -lt 29 ]]; then
17851786 if [ -n " $INTERNAL_IP " ]; then
1786- yq -y -i " .freeswitch.sip_ip = \" $INTERNAL_IP \" " $TARGET
1787+ yq-go e -i " .freeswitch.sip_ip = \" $INTERNAL_IP \" " $TARGET
17871788 else
1788- yq -y -i " .freeswitch.sip_ip = \" $IP \" " $TARGET
1789+ yq-go e -i " .freeswitch.sip_ip = \" $IP \" " $TARGET
17891790 fi
17901791 else
17911792 # Use nginx as proxy for WSS -> WS (see https://github.com/bigbluebutton/bigbluebutton/issues/9667)
1792- yq -y -i " .freeswitch.sip_ip = \" $IP \" " $TARGET
1793+ yq-go e -i " .freeswitch.sip_ip = \" $IP \" " $TARGET
17931794 fi
17941795 chown bigbluebutton:bigbluebutton $TARGET
17951796 chmod 644 $TARGET
17961797
17971798 # Configure mediasoup IPs, reference: https://raw.githubusercontent.com/bigbluebutton/bbb-webrtc-sfu/v2.7.2/docs/mediasoup.md
17981799 # mediasoup IPs: WebRTC
1799- yq -y -i ' .mediasoup.webrtc.listenIps[0].ip = "0.0.0.0"' $TARGET
1800- yq -y -i " .mediasoup.webrtc.listenIps[0].announcedIp = \" $IP \" " $TARGET
1800+ yq-go e -i ' .mediasoup.webrtc.listenIps[0].ip = "0.0.0.0"' $TARGET
1801+ yq-go e -i " .mediasoup.webrtc.listenIps[0].announcedIp = \" $IP \" " $TARGET
18011802
18021803 # mediasoup IPs: plain RTP (internal comms, FS <-> mediasoup)
1803- yq -y -i ' .mediasoup.plainRtp.listenIp.ip = "0.0.0.0"' $TARGET
1804- yq -y -i " .mediasoup.plainRtp.listenIp.announcedIp = \" $IP \" " $TARGET
1804+ yq-go e -i ' .mediasoup.plainRtp.listenIp.ip = "0.0.0.0"' $TARGET
1805+ yq-go e -i " .mediasoup.plainRtp.listenIp.announcedIp = \" $IP \" " $TARGET
18051806
18061807 systemctl reload nginx
18071808}
0 commit comments