Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

add systemd to letsencrypt installer (#8289)

53845714nFf82088fb8f86
diff --git a/resources/install-letsencrypt-cert.sh b/resources/install-letsencrypt-cert.sh
index 29c114b1b5..d9f827c99b 100755
--- a/resources/install-letsencrypt-cert.sh
+++ b/resources/install-letsencrypt-cert.sh
@@ -95,9 +95,16 @@ if [ -f /etc/nginx/sites-enabled/$DOMAIN.conf ] ; then
CERT_CRT_ESC=$(echo $CERT_CRT_ESC | sed 's/\//\\\//g')
sed -i "s/ssl_certificate\ \/etc\/jitsi\/meet\/.*crt/ssl_certificate\ $CERT_CRT_ESC/g" \
$CONF_FILE
-
- echo "service nginx reload" >> $CRON_FILE
- service nginx reload
+
+ if type service >/dev/null 2>&1
+ then
+ service nginx reload
+ echo "service nginx reload" >> $CRON_FILE
+ else
+ systemctl reload nginx.service
+ echo "systemctl reload nginx.service" >> $CRON_FILE
+ fi
+
elif [ -f /etc/apache2/sites-enabled/$DOMAIN.conf ] ; then
/usr/bin/certbot certonly --noninteractive \
@@ -116,9 +123,15 @@ elif [ -f /etc/apache2/sites-enabled/$DOMAIN.conf ] ; then
CERT_CRT_ESC=$(echo $CERT_CRT_ESC | sed 's/\//\\\//g')
sed -i "s/SSLCertificateFile\ \/etc\/jitsi\/meet\/.*crt/SSLCertificateFile\ $CERT_CRT_ESC/g" \
$CONF_FILE
-
- echo "service apache2 reload" >> $CRON_FILE
- service apache2 reload
+
+ if type service >/dev/null 2>&1
+ then
+ service apache2 reload
+ echo "service apache2 reload" >> $CRON_FILE
+ else
+ systemctl reload apache2.service
+ echo "systemctl reload apache2.service" >> $CRON_FILE
+ fi
fi
# the cron file that will renew certificates