Fix bug with seconds (#55)

This commit is contained in:
Pascal Vizeli
2017-05-13 16:13:06 +02:00
committed by GitHub
parent 6559d29eea
commit b1320637ed
2 changed files with 3 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "Duck DNS",
"version": "0.2",
"version": "0.3",
"slug": "duckdns",
"description": "Free dynamic DNS hosted on Amazon VPC",
"url": "https://home-assistant.io/addons/duckdns/",

View File

@@ -5,7 +5,7 @@ CONFIG_PATH=/data/options.json
TOKEN=$(jq --raw-output ".token" $CONFIG_PATH)
DOMAINS=$(jq --raw-output ".domains[]" $CONFIG_PATH)
SECONDS=$(jq --raw-output ".seconds" $CONFIG_PATH)
WAIT_TIME=$(jq --raw-output ".seconds" $CONFIG_PATH)
for line in $DOMAINS; do
if [ -z "$DOMAIN_ARG" ]; then
@@ -19,5 +19,5 @@ done
while true; do
ANSWER="$(curl -sk "https://www.duckdns.org/update?domains=$DOMAIN_ARG&token=$TOKEN&ip=&verbose=true")"
echo "$(date): $ANSWER"
sleep "$SECONDS"
sleep "$WAIT_TIME"
done