summaryrefslogtreecommitdiffstats
path: root/client/install-hook.sh
blob: 08576dd4d7c0bc5c1bab64e18bf3d9ba5dd09b2f (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash

. $(dirname $(realpath $0))/hook-config

curl "$API_URL/api/1/add?token=$API_TOKEN&record=$CERTBOT_DOMAIN&value=$CERTBOT_VALIDATION"

# FIXME: ovh is shit
while [ "$(dig _acme-challenge.$CERTBOT_DOMAIN TXT +short | wc -l)" -lt 1 ]; do
    echo 'still waiting...' >&2
    sleep 5;
done