maj du script lets encrypt
This commit is contained in:
@@ -30,6 +30,9 @@ if [ ! -f certbot-auto ] ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
CRON_FILE="/etc/cron.weekly/letsencrypt-renew"
|
CRON_FILE="/etc/cron.weekly/letsencrypt-renew"
|
||||||
|
if [ ! -d "/etc/cron.weekly" ] ; then
|
||||||
|
mkdir "/etc/cron.weekly"
|
||||||
|
fi
|
||||||
echo "#!/bin/bash" > $CRON_FILE
|
echo "#!/bin/bash" > $CRON_FILE
|
||||||
echo "/usr/local/sbin/certbot-auto renew >> /var/log/le-renew.log" >> $CRON_FILE
|
echo "/usr/local/sbin/certbot-auto renew >> /var/log/le-renew.log" >> $CRON_FILE
|
||||||
|
|
||||||
@@ -58,6 +61,15 @@ if [ -f /etc/nginx/sites-enabled/$DOMAIN.conf ] ; then
|
|||||||
echo "service nginx reload" >> $CRON_FILE
|
echo "service nginx reload" >> $CRON_FILE
|
||||||
service nginx reload
|
service nginx reload
|
||||||
|
|
||||||
|
TURN_CONFIG="/etc/turnserver.conf"
|
||||||
|
if [ -f $TURN_CONFIG ] && grep -q "jitsi-meet coturn config" "$TURN_CONFIG" ; then
|
||||||
|
echo "Configuring turnserver"
|
||||||
|
sed -i "s/cert=\/etc\/jitsi\/meet\/.*crt/cert=$CERT_CRT_ESC/g" $TURN_CONFIG
|
||||||
|
sed -i "s/pkey=\/etc\/jitsi\/meet\/.*key/pkey=$CERT_KEY_ESC/g" $TURN_CONFIG
|
||||||
|
|
||||||
|
echo "service coturn restart" >> $CRON_FILE
|
||||||
|
service coturn restart
|
||||||
|
fi
|
||||||
elif [ -f /etc/apache2/sites-enabled/$DOMAIN.conf ] ; then
|
elif [ -f /etc/apache2/sites-enabled/$DOMAIN.conf ] ; then
|
||||||
|
|
||||||
./certbot-auto certonly --noninteractive \
|
./certbot-auto certonly --noninteractive \
|
||||||
@@ -101,6 +113,3 @@ else
|
|||||||
service jitsi-videobridge start
|
service jitsi-videobridge start
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# the cron file that will renew certificates
|
|
||||||
chmod a+x $CRON_FILE
|
|
||||||
Reference in New Issue
Block a user