diff --git a/evocheck.sh b/evocheck.sh index 661ddbb..e9715a7 100755 --- a/evocheck.sh +++ b/evocheck.sh @@ -769,18 +769,20 @@ if [ -e /etc/debian_version ]; then fi if [ "$IS_EVOACME_LIVELINKS" = 1 ]; then - for live in /etc/letsencrypt/*/live; do - actualLink=$(ls -lhad $live | tr -s ' ' | cut -d' ' -f 11) - actualCertDate=$(cut -d'/' -f5 <<< $actualLink) - liveDir=$(ls -lhad $live | tr -s ' ' | cut -d' ' -f 9) - certDir=${liveDir%%/live} - lastCertDir=$(stat -c %n ${certDir}/[0-9]* | tail -1) - lastCertDate=$(cut -d'/' -f5 <<< $lastCertDir) - if [[ "$actualCertDate" != "$lastCertDate" ]]; then - echo 'IS_EVOACME_LIVELINKS FAILED!' - break - fi - done + if [ -x "$(which evoacme)" ]; then + for live in /etc/letsencrypt/*/live; do + actualLink=$(ls -lhad $live | tr -s ' ' | cut -d' ' -f 11) + actualCertDate=$(cut -d'/' -f5 <<< $actualLink) + liveDir=$(ls -lhad $live | tr -s ' ' | cut -d' ' -f 9) + certDir=${liveDir%%/live} + lastCertDir=$(stat -c %n ${certDir}/[0-9]* | tail -1) + lastCertDate=$(cut -d'/' -f5 <<< $lastCertDir) + if [[ "$actualCertDate" != "$lastCertDate" ]]; then + echo 'IS_EVOACME_LIVELINKS FAILED!' + break + fi + done + fi fi fi