File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,13 @@ setup_permissions() {
2020 chmod 600 /etc/coturn/certs/* .pem
2121}
2222
23+ wait_for_apt () {
24+ while fuser /var/lib/dpkg/lock > /dev/null 2>&1 || fuser /var/lib/apt/lists/lock > /dev/null 2>&1 || fuser /var/cache/apt/archives/lock > /dev/null 2>&1 || fuser /var/lib/dpkg/lock-frontend > /dev/null 2>&1 ; do
25+ echo " Waiting for other apt processes to finish..."
26+ sleep 5
27+ done
28+ }
29+
2330configure_ssl () {
2431 local DOMAIN=$1
2532
@@ -32,6 +39,8 @@ configure_ssl() {
3239
3340 # Install certbot if needed
3441 if ! command -v certbot > /dev/null; then
42+ echo " Installing certbot..."
43+ wait_for_apt
3544 apt-get install certbot -y
3645 fi
3746
@@ -207,4 +216,4 @@ echo "STUN/TURN ports: 3478 (default)"
207216if [ " ${ENABLE_SSL,,} " = " y" ]; then
208217 echo " TLS enabled on port 443"
209218 echo " SSL certificates will automatically renew via certbot"
210- fi
219+ fi
You can’t perform that action at this time.
0 commit comments