shame on me. I've been quite busy over the last month, due to university exam stuff (and will be in vacation next week), but I had some spare cycles now so I looked at this.
On Mon, Jun 13, 2016 at 10:47:56AM +0200, Daniel Beyer wrote: > I pushed changes to this new branch (based on current debian/master): > wip/dabe/domains.txt-in-etc-maint-scripts > > It adds maintainer scripts to deal with domains.txt as well as the > PRIVATE_KEY to ACCOUNT_KEY renaming. I also updated d/NEWS to mention > what happens during the upgrade and updated d/changelog accordingly > using '# gbp dch --snapshot --auto'. Fell free to push additional > changes to it and/or share your opinion about those scripts - or simply > merge it into debian/master. lgtm. the way to grab vars from le.sh looks quite convoluted, but I see what you did. apparently it doesn't emit BASEDIR in -e's output, so it's kinda hard to do checks on it. fine by me. I added a couple of changes (mostly wording (imho) improvements), please look at that. > Note that I did not do anything regarding installing a domains.txt > in /etc/letsencrypt.sh. I also tackled this. I added a small entry there pointing to upstream's doc. For the "show a message if domains.txt's empty" foo I quickly cooked the attached thing. What do you think of it? If you think that's sane enough it'd be helpful if you could try to forward it upstream and/or commit (with a nicer message maybe...) to the packaging. As I said next week I'll be out (and the one after I'll have to catch up for having been a week out), so I can't really look into this so soon again… > if there will be work left to get 0.2.0-1 ready for an upload to unstable. I'd just like this bit done… -- regards, Mattia Rizzolo GPG Key: 66AE 2B4A FCCF 3F52 DA18 4D18 4B04 3FCD B944 4540 .''`. more about me: https://mapreri.org : :' : Launchpad user: https://launchpad.net/~mapreri `. `'` Debian QA page: https://qa.debian.org/developer.php?login=mattia `-
diff --git a/letsencrypt.sh b/letsencrypt.sh index fccad50..b9c27a3 100755 --- a/letsencrypt.sh +++ b/letsencrypt.sh @@ -579,7 +579,12 @@ command_sign_domains() { # Generate certificates for all domains found in domains.txt. Check if existing certificate are about to expire ORIGIFS="${IFS}" IFS=$'\n' - for line in $(<"${DOMAINS_TXT}" tr -d '\r' | tr '[:upper:]' '[:lower:]' | _sed -e 's/^[[:space:]]*//g' -e 's/[[:space:]]*$//g' -e 's/[[:space:]]+/ /g' | (grep -vE '^(#|$)' || true)); do + local tmp_domains_txt="$(_mktemp)" + cat "${DOMAINS_TXT}" | tr -d '\r' | tr '[:upper:]' '[:lower:]' | _sed -e 's/^[[:space:]]*//g' -e 's/[[:space:]]*$//g' -e 's/[[:space:]]+/ /g' | (grep -vE '^(#|$)'|| true)> "${tmp_domains_txt}" + if [ ! -s "${tmp_domains_txt}" ]; then + echo "domains.txt contains no actionable lines!" >&2 + fi + for line in $(> "${tmp_domains_txt}"); do IFS="${ORIGIFS}" domain="$(printf '%s\n' "${line}" | cut -d' ' -f1)" morenames="$(printf '%s\n' "${line}" | cut -s -d' ' -f2-)" @@ -637,6 +642,7 @@ command_sign_domains() { # remove temporary domains.txt file if used [[ -n "${PARAM_DOMAIN:-}" ]] && rm -f "${DOMAINS_TXT}" + rm -f "${tmp_domains_txt}" exit 0 }
signature.asc
Description: PGP signature