modified: nginx/switch-config.sh
add checking for all domains
This commit is contained in:
@@ -1,8 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Проверяем наличие сертификатов
|
# Проверяем наличие сертификатов для всех трёх доменов
|
||||||
if [ -f "/etc/letsencrypt/live/yalarba.ru/fullchain.pem" ]; then
|
if \
|
||||||
echo "SSL certificates found, switching to HTTPS configuration"
|
[ -f "/etc/letsencrypt/live/yalarba.ru/fullchain.pem" ] || \
|
||||||
|
[ -f "/etc/letsencrypt/live/easysite102.ru/fullchain.pem" ] || \
|
||||||
|
[ -f "/etc/letsencrypt/live/valitovgaziz.ru/fullchain.pem" ]; then
|
||||||
|
echo "SSL certificates found for at least one domain, switching to HTTPS configuration"
|
||||||
ln -sf /etc/nginx/nginx-ssl.conf /etc/nginx/conf.d/default.conf
|
ln -sf /etc/nginx/nginx-ssl.conf /etc/nginx/conf.d/default.conf
|
||||||
else
|
else
|
||||||
echo "SSL certificates not found, using HTTP only configuration"
|
echo "SSL certificates not found, using HTTP only configuration"
|
||||||
|
|||||||
Reference in New Issue
Block a user