forked from evolix/evocheck
Add IS_EVOACME_LIVELINKS check
This commit is contained in:
parent
fee78ee9f4
commit
a6b54d99e9
16
evocheck.sh
16
evocheck.sh
|
@ -102,6 +102,7 @@ IS_EVOBACKUP=1
|
||||||
IS_DUPLICATE_FS_LABEL=1
|
IS_DUPLICATE_FS_LABEL=1
|
||||||
IS_EVOMAINTENANCE_FW=1
|
IS_EVOMAINTENANCE_FW=1
|
||||||
IS_EVOLIX_USER=1
|
IS_EVOLIX_USER=1
|
||||||
|
IS_EVOACME_LIVELINKS=1
|
||||||
|
|
||||||
#Proper to OpenBSD
|
#Proper to OpenBSD
|
||||||
IS_SOFTDEP=1
|
IS_SOFTDEP=1
|
||||||
|
@ -766,6 +767,21 @@ if [ -e /etc/debian_version ]; then
|
||||||
if [ "$IS_EVOLIX_USER" = 1 ]; then
|
if [ "$IS_EVOLIX_USER" = 1 ]; then
|
||||||
getent passwd evolix >/dev/null && echo 'IS_EVOLIX_USER FAILED!'
|
getent passwd evolix >/dev/null && echo 'IS_EVOLIX_USER FAILED!'
|
||||||
fi
|
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
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue