Fix hook warning (#272)

* Fix hook warning

* Update config.json

* Update CHANGELOG.md
This commit is contained in:
Pascal Vizeli
2018-03-26 21:32:19 +02:00
committed by GitHub
parent 25f9097e22
commit 1a0d5e85ae
3 changed files with 5 additions and 11 deletions

View File

@@ -1,5 +1,8 @@
# Changelog
## 1.3
- Fix dehydrated warning from hook script
## 1.2
- Update dehydrated to version 0.6.1

View File

@@ -1,6 +1,6 @@
{
"name": "Duck DNS",
"version": "1.2",
"version": "1.3",
"slug": "duckdns",
"description": "Free Dynamic DNS (DynDNS or DDNS) service with Let's Encrypt support",
"url": "https://home-assistant.io/addons/duckdns/",

View File

@@ -8,6 +8,7 @@ TOKEN=$(jq --raw-output '.token' $CONFIG_PATH)
CERTFILE=$(jq --raw-output '.lets_encrypt.certfile' $CONFIG_PATH)
KEYFILE=$(jq --raw-output '.lets_encrypt.keyfile' $CONFIG_PATH)
# https://github.com/lukas2511/dehydrated/blob/master/docs/examples/hook.sh
case "$1" in
"deploy_challenge")
curl -s "https://www.duckdns.org/update?domains=$DOMAINS&token=$TOKEN&txt=$4"
@@ -19,14 +20,4 @@ case "$1" in
cp -f "$5" "/ssl/$CERTFILE"
cp -f "$3" "/ssl/$KEYFILE"
;;
"unchanged_cert")
;;
"startup_hook")
;;
"exit_hook")
;;
*)
echo Unknown hook "${1}"
exit 0
;;
esac