Browse Source

fix loop

Signed-off-by: Nico Schottelius <nico@nico-notebook.schottelius.org>
master 0.3.2
Nico Schottelius 7 months ago
parent
commit
e9efb22c3e
  1. 2
      build.sh
  2. 6
      entrypoint.sh

2
build.sh

@ -6,6 +6,8 @@ docker build -t ungleich-certbot .
while [ $# -ge 1 ]; do
tag=$1; shift
git tag -a -m "Version $tag" $tag
git push --tags
docker tag ungleich-certbot:latest ungleich/ungleich-certbot:${tag}
docker push ungleich/ungleich-certbot:${tag}
done

6
entrypoint.sh

@ -15,11 +15,11 @@ while [ -z "$ipv6_addr" -a -z "$ipv4_addr" ]; do
ipv6_addr=$(dig +short "$DOMAIN" aaaa)
ipv4_addr=$(dig +short "$DOMAIN" a)
if [ -z -z "$ipv6_addr" -a -z "$ipv4_addr" ]; then
if [ "$ipv6_addr" -o "$ipv4_addr" ]; then
echo "Resolved domain $DOMAIN: ipv6: $ipv6_addr ipv4: $ipv4_addr"
else
echo "Resolving $DOMAIN failed, waiting 5 seconds before retrying ..."
sleep 5
else
echo "Resolved domain $DOMAIN: ipv6: $ipv6_addr ipv4: $ipv4_addr"
fi
done

Loading…
Cancel
Save