IS_EVOACME_LIVELINKS: Only executed if evoacme installed
This commit is contained in:
parent
a6b54d99e9
commit
9c5f8653fd
26
evocheck.sh
26
evocheck.sh
|
@ -769,18 +769,20 @@ if [ -e /etc/debian_version ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$IS_EVOACME_LIVELINKS" = 1 ]; then
|
if [ "$IS_EVOACME_LIVELINKS" = 1 ]; then
|
||||||
for live in /etc/letsencrypt/*/live; do
|
if [ -x "$(which evoacme)" ]; then
|
||||||
actualLink=$(ls -lhad $live | tr -s ' ' | cut -d' ' -f 11)
|
for live in /etc/letsencrypt/*/live; do
|
||||||
actualCertDate=$(cut -d'/' -f5 <<< $actualLink)
|
actualLink=$(ls -lhad $live | tr -s ' ' | cut -d' ' -f 11)
|
||||||
liveDir=$(ls -lhad $live | tr -s ' ' | cut -d' ' -f 9)
|
actualCertDate=$(cut -d'/' -f5 <<< $actualLink)
|
||||||
certDir=${liveDir%%/live}
|
liveDir=$(ls -lhad $live | tr -s ' ' | cut -d' ' -f 9)
|
||||||
lastCertDir=$(stat -c %n ${certDir}/[0-9]* | tail -1)
|
certDir=${liveDir%%/live}
|
||||||
lastCertDate=$(cut -d'/' -f5 <<< $lastCertDir)
|
lastCertDir=$(stat -c %n ${certDir}/[0-9]* | tail -1)
|
||||||
if [[ "$actualCertDate" != "$lastCertDate" ]]; then
|
lastCertDate=$(cut -d'/' -f5 <<< $lastCertDir)
|
||||||
echo 'IS_EVOACME_LIVELINKS FAILED!'
|
if [[ "$actualCertDate" != "$lastCertDate" ]]; then
|
||||||
break
|
echo 'IS_EVOACME_LIVELINKS FAILED!'
|
||||||
fi
|
break
|
||||||
done
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue