Skip to content

Instantly share code, notes, and snippets.

@alisalehiman
Last active March 3, 2020 22:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alisalehiman/180c7c6055cd31270de3d43b3a27e4c9 to your computer and use it in GitHub Desktop.
Save alisalehiman/180c7c6055cd31270de3d43b3a27e4c9 to your computer and use it in GitHub Desktop.
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
Copy link
Author

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