Last active
March 3, 2020 22:38
-
-
Save alisalehiman/180c7c6055cd31270de3d43b3a27e4c9 to your computer and use it in GitHub Desktop.
LetsEncrypt 2020.02.29 CAA Rechecking Bug Fix for Directadmin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
for a in `find /usr/local/directadmin/data/users/*/domains.list`; do | |
u=`echo "$a" | awk -F / '{ print $7 }'` | |
for d in `cat $a`; do | |
echo check $d LetsEncrypt... | |
CHECK=`curl -s -XPOST -d "fqdn=$d" https://checkhost.unboundtest.com/checkhost` | |
if echo "$CHECK" | grep -q "needs renewal"; then | |
echo $d is vulnerable. | |
echo Renew $d Domain : | |
cd /usr/local/directadmin/ | |
echo 1577999687 > data/users/$u/domains/$d.cert.creation_time | |
echo "action=rewrite&value=letsencrypt&domain=$d" > data/task.queue; | |
./dataskq d3100 | |
fi | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
LetsEncrypt 2020.02.29 CAA Rechecking Bug Fix for Directadmin
Usage: