Read domain from inifile
Read the domain from inifile property domains instead of using filename As letsencrypt uses this value, missconfigurations should be nearly impossible this way
This commit is contained in:
@@ -42,8 +42,8 @@ fi
|
||||
# Get all existing inifiles matching namescheme cli-${domain}.ini
|
||||
for inifile in "${LECONFIGDIR}"/cli-*.ini; do
|
||||
|
||||
# Strip domain out of filename
|
||||
domain=${inifile:$(( ${#LECONFIGDIR} + 5 )):-4}
|
||||
# Get domain out of file (first value in property "domains")
|
||||
domain=$(grep -e "[ \t]*domains.*" "${inifile}" | sed "s/ //g" |cut -d "=" -f2 | cut -d "," -f1)
|
||||
|
||||
# sleep for a random time so not all certificates get renewed at the same time
|
||||
sleep $(expr $RANDOM % 600)
|
||||
|
||||
Reference in New Issue
Block a user