From 225a5566be932701b41f81b6de7d49bc0b5a55c0 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Wed, 24 May 2017 11:26:50 +0200 Subject: [PATCH] Make let's encrypt more robust (#95) Robust lesencrypt --- letsencrypt/config.json | 2 +- letsencrypt/run.sh | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/letsencrypt/config.json b/letsencrypt/config.json index 03cb92d..ac7c8ae 100644 --- a/letsencrypt/config.json +++ b/letsencrypt/config.json @@ -1,6 +1,6 @@ { "name": "Let's Encrypt", - "version": "0.8", + "version": "0.9", "slug": "letsencrypt", "description": "Manage Let's Encrypt certificate", "url": "https://home-assistant.io/addons/lets_encrypt/", diff --git a/letsencrypt/run.sh b/letsencrypt/run.sh index 97a91ac..0567d9e 100644 --- a/letsencrypt/run.sh +++ b/letsencrypt/run.sh @@ -10,8 +10,10 @@ DOMAINS=$(jq --raw-output ".domains[]" $CONFIG_PATH) KEYFILE=$(jq --raw-output ".keyfile" $CONFIG_PATH) CERTFILE=$(jq --raw-output ".certfile" $CONFIG_PATH) +mkdir -p "$CERT_DIR" + # Generate new certs -if [ ! -d "$CERT_DIR" ]; then +if [ ! -d "$CERT_DIR/live" ]; then DOMAIN_ARR=() for line in $DOMAINS; do DOMAIN_ARR+=(-d "$line")