mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-07-19 19:41:11 +02:00
curl follow Gitlab redirect, silent deploy, better status message
+3
-3
@@ -27,8 +27,8 @@ deploy_challenge() {
|
||||
git -C "$REPO" commit -m "Let's Encrypt challenge"
|
||||
git -C "$REPO" push
|
||||
sleep 20
|
||||
while ! curl --output /dev/null --silent --head --fail "https://$DOMAIN/.well-known/acme-challenge/$TOKEN_FILENAME"; do
|
||||
echo sleeping
|
||||
while ! curl --output /dev/null --silent --head --location --fail "https://$DOMAIN/.well-known/acme-challenge/$TOKEN_FILENAME"; do
|
||||
echo "Waiting for challenge to be deployed"
|
||||
sleep 5
|
||||
done
|
||||
}
|
||||
@@ -45,7 +45,7 @@ deploy_cert() {
|
||||
DOMAIN="$1"
|
||||
KEYFILE="$2"
|
||||
FULLCHAINFILE="$4"
|
||||
curl --request PUT --header "PRIVATE-TOKEN: $TOKEN" --form "certificate=@$FULLCHAINFILE" --form "key=@$KEYFILE" "https://gitlab.com/api/v4/projects/$PROJECT/pages/domains/$DOMAIN"
|
||||
curl --output /dev/null --silent --fail --request PUT --header "PRIVATE-TOKEN: $TOKEN" --form "certificate=@$FULLCHAINFILE" --form "key=@$KEYFILE" "https://gitlab.com/api/v4/projects/$PROJECT/pages/domains/$DOMAIN"
|
||||
}
|
||||
|
||||
HANDLER="$1"; shift
|
||||
|
||||
Reference in New Issue
Block a user