IS_EVOACME_LIVELINKS: Add a condition when there is no certificates

This commit is contained in:
Benoît S. 2018-07-05 10:19:43 +02:00
parent 08b5ae0819
commit cd38bbaab4

View file

@ -782,6 +782,9 @@ if [ -e /etc/debian_version ]; then
if [ "$IS_EVOACME_LIVELINKS" = 1 ]; then
if [ -x "$(which evoacme)" ]; then
# Sometimes evoacme is installed but no certificates has been generated
numberOfLinks=$(find /etc/letsencrypt/ -type l | wc -l)
if [ $numberOfLinks -gt 0 ]; then
for live in /etc/letsencrypt/*/live; do
actualLink=$(ls -lhad $live | tr -s ' ' | cut -d' ' -f 11)
actualCertDate=$(cut -d'/' -f5 <<< $actualLink)
@ -796,6 +799,7 @@ if [ -e /etc/debian_version ]; then
done
fi
fi
fi
if [ "$IS_APACHE_CONFENABLED" = 1 ]; then
# Starting from Jessie and Apache 2.4, /etc/apache2/conf.d/