Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
LetsEncrypt 2020.02.29 CAA Rechecking Bug Fix for Directadmin
#!/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
@alisalehiman

This comment has been minimized.

Copy link
Owner Author

@alisalehiman alisalehiman commented Mar 3, 2020

LetsEncrypt 2020.02.29 CAA Rechecking Bug Fix for Directadmin

Usage:

https://gist.github.com/alisalehiman/180c7c6055cd31270de3d43b3a27e4c9/raw/dc32abe78f8a0b8026c4d2ef18962dd9b202fafb/Directadmin-LetsEncrypt.sh
chmod +x Directadmin-LetsEncrypt.sh
./Directadmin-LetsEncrypt.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.