Merge pull request #34 from home-assistant/build

Update let's encrypt
This commit is contained in:
Pascal Vizeli
2017-05-06 00:30:41 +02:00
committed by GitHub
3 changed files with 12 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "Let's Encrypt", "name": "Let's Encrypt",
"version": "0.2", "version": "0.3",
"slug": "letsencrypt", "slug": "letsencrypt",
"description": "Manage let's encrypt certificate", "description": "Manage let's encrypt certificate",
"startup": "once", "startup": "once",

View File

@@ -17,11 +17,8 @@ if [ ! -f /data/certbot-auto ]; then
chmod a+x certbot-auto chmod a+x certbot-auto
fi fi
# Start program # Generate new certs
if [ -d $CERT_DIR ]; then if [ ! -d "$CERT_DIR" ]; then
/data/certbot-auto renew --non-interactive --config-dir $CERT_DIR --work-dir $WORK_DIR
else
# generate domains
for line in $DOMAINS; do for line in $DOMAINS; do
if [ -z "$DOMAIN_ARG" ]; then if [ -z "$DOMAIN_ARG" ]; then
DOMAIN_ARG="-d $line" DOMAIN_ARG="-d $line"
@@ -30,9 +27,14 @@ else
fi fi
done done
/data/certbot-auto certonly --non-interactive --standalone --email "$EMAIL" --config-dir $CERT_DIR --work-dir "$DOMAIN_ARG" echo "$DOMAINS" > /data/domains.gen
/data/certbot-auto certonly --non-interactive --standalone --email "$EMAIL" --config-dir "$CERT_DIR" --work-dir "$DOMAIN_ARG"
# Renew certs
else
/data/certbot-auto renew --non-interactive --config-dir "$CERT_DIR" --work-dir "$WORK_DIR"
fi fi
# copy certs to store # copy certs to store
cp /data/letsencrypt/live/*/privkey.pem "/ssl/$KEYFILE" cp "$CERT_DIR"/live/*/privkey.pem "/ssl/$KEYFILE"
cp /data/letsencrypt/live/*/fullchain.pem "/ssl/$CERTFILE" cp "$CERT_DIR"/live/*/fullchain.pem "/ssl/$CERTFILE"

View File

@@ -3,7 +3,7 @@
"version": "0.3", "version": "0.3",
"slug": "samba", "slug": "samba",
"description": "Expose HassIO folders with samba", "description": "Expose HassIO folders with samba",
"startup": "after", "startup": "before",
"boot": "auto", "boot": "auto",
"ports": { "ports": {
"445/tcp": 445 "445/tcp": 445