Last active
October 20, 2017 20:30
-
-
Save phmLabs/cb4a5346c428360cf07c46558b3e3479 to your computer and use it in GitHub Desktop.
Lets encrypt
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
#!/bin/bash | |
a=$(/usr/bin/php /root/acmephp.phar authorize $1) | |
file=`echo "$a" | grep -o "challenge\/[a-zA-Z0-9\_\.\-]*" | cut -c11-100` | |
filename="/var/www/vhost/$1/htdocs/.well-known/acme-challenge/$file" | |
echo "$filename" | |
secret=`echo "$a" | grep -o "that the URL [a-zA-Z0-9\_\.\-]*" | cut -c14-100` | |
echo "$secret" > $filename | |
php ./acmephp.phar check -s http $1 | |
rm $filename | |
php ./acmephp.phar request $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment