From: Mark Wooding Date: Wed, 12 Jul 2017 22:02:16 +0000 (+0100) Subject: Switch to running dehydrated. X-Git-Url: https://git.distorted.org.uk/~mdw/distorted-letsencrypt/commitdiff_plain/8a0c5e387ace2086ff659ae2f9baccaae387bcf1?hp=6bbb7b44ec2224926ade67d7fc8785ffa3d75930 Switch to running dehydrated. It's packaged by Debian and seems much less disastrous. Simplify much of the machinery. --- diff --git a/.gitignore b/.gitignore index 2978b42..bdc19ef 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,6 @@ -.cache -.ccache -.config .lesshst -.local cert/ etc/ log/ -req/ tmp/ webroot/ diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index e087ce7..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "letsencrypt"] - path = letsencrypt - url = https://github.com/letsencrypt/letsencrypt/ diff --git a/bin/le b/bin/le deleted file mode 100755 index 0ec46b2..0000000 --- a/bin/le +++ /dev/null @@ -1,11 +0,0 @@ -#! /bin/sh -set -e -prog=$(readlink -e "$0") -. "${prog%/*}/../config.sh" -. "$home/lib/lib.sh" - -run_as_user "$@" -prepare_tmp le-user -make_le_conf - -exec $home/letsencrypt/letsencrypt-auto -c "$tmp/le.conf" "$@" diff --git a/bin/make-cert b/bin/make-cert index 19808c6..fd0cdf5 100755 --- a/bin/make-cert +++ b/bin/make-cert @@ -14,26 +14,8 @@ case $# in 0) ;; *) fail_usage ;; esac prepare_tmp $tag -## Get started. +## Let's go. cert=$home/cert/$tag cd $cert -openssl req -in req -out $tmp/req.der -outform der -sans=$(openssl req -in req -text -noout | - sed -n ' - x - /^ *X509v3 Subject Alternative Name: $/ { - x - s/ *DNS://g - s/,/ /g - p - x - }') -make_le_conf $sans - -cd $tmp -$home/letsencrypt/letsencrypt-auto -c "$tmp/le.conf" --text \ - -a webroot --csr $tmp/req.der certonly - -cd $cert -cat $tmp/0001_chain.pem $home/le-root.cert >full-chain.new +dehydrated -f $HOME/dehydrated-config.sh -fc -s req >full-chain.new mv full-chain.new full-chain diff --git a/bin/setup b/bin/setup index dc243a0..4b4ad14 100755 --- a/bin/setup +++ b/bin/setup @@ -13,12 +13,8 @@ while read d m u g; do chown $u:$g $d done <$tmp/le.conf -} \ No newline at end of file