mirror of
https://github.com/SrIzan10/vdo.ninja.git
synced 2026-05-01 11:05:24 +00:00
Update turnserver_install.sh.sample
This commit is contained in:
@@ -20,6 +20,13 @@ setup_permissions() {
|
|||||||
chmod 600 /etc/coturn/certs/*.pem
|
chmod 600 /etc/coturn/certs/*.pem
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wait_for_apt() {
|
||||||
|
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
|
||||||
|
echo "Waiting for other apt processes to finish..."
|
||||||
|
sleep 5
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
configure_ssl() {
|
configure_ssl() {
|
||||||
local DOMAIN=$1
|
local DOMAIN=$1
|
||||||
|
|
||||||
@@ -32,6 +39,8 @@ configure_ssl() {
|
|||||||
|
|
||||||
# Install certbot if needed
|
# Install certbot if needed
|
||||||
if ! command -v certbot >/dev/null; then
|
if ! command -v certbot >/dev/null; then
|
||||||
|
echo "Installing certbot..."
|
||||||
|
wait_for_apt
|
||||||
apt-get install certbot -y
|
apt-get install certbot -y
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -207,4 +216,4 @@ echo "STUN/TURN ports: 3478 (default)"
|
|||||||
if [ "${ENABLE_SSL,,}" = "y" ]; then
|
if [ "${ENABLE_SSL,,}" = "y" ]; then
|
||||||
echo "TLS enabled on port 443"
|
echo "TLS enabled on port 443"
|
||||||
echo "SSL certificates will automatically renew via certbot"
|
echo "SSL certificates will automatically renew via certbot"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user