Sergey Pashinin
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
16 additions and
5 deletions
-
deploy/vault.sh
|
@ -56,12 +56,23 @@ vault_deploy() { |
|
|
export _H1="X-Vault-Token: $VAULT_TOKEN" |
|
|
export _H1="X-Vault-Token: $VAULT_TOKEN" |
|
|
|
|
|
|
|
|
if [ -n "$FABIO" ]; then |
|
|
if [ -n "$FABIO" ]; then |
|
|
|
|
|
if [ -n "$VAULT_KV_V2" ]; then |
|
|
|
|
|
_post "{ \"data\": {\"cert\": \"$_cfullchain\", \"key\": \"$_ckey\"} }" "$URL" |
|
|
|
|
|
else |
|
|
_post "{\"cert\": \"$_cfullchain\", \"key\": \"$_ckey\"}" "$URL" |
|
|
_post "{\"cert\": \"$_cfullchain\", \"key\": \"$_ckey\"}" "$URL" |
|
|
|
|
|
fi |
|
|
|
|
|
else |
|
|
|
|
|
if [ -n "$VAULT_KV_V2" ]; then |
|
|
|
|
|
_post "{\"data\": {\"value\": \"$_ccert\"}}" "$URL/cert.pem" |
|
|
|
|
|
_post "{\"data\": {\"value\": \"$_ckey\"}}" "$URL/cert.key" |
|
|
|
|
|
_post "{\"data\": {\"value\": \"$_cca\"}}" "$URL/chain.pem" |
|
|
|
|
|
_post "{\"data\": {\"value\": \"$_cfullchain\"}}" "$URL/fullchain.pem" |
|
|
else |
|
|
else |
|
|
_post "{\"value\": \"$_ccert\"}" "$URL/cert.pem" |
|
|
_post "{\"value\": \"$_ccert\"}" "$URL/cert.pem" |
|
|
_post "{\"value\": \"$_ckey\"}" "$URL/cert.key" |
|
|
_post "{\"value\": \"$_ckey\"}" "$URL/cert.key" |
|
|
_post "{\"value\": \"$_cca\"}" "$URL/chain.pem" |
|
|
_post "{\"value\": \"$_cca\"}" "$URL/chain.pem" |
|
|
_post "{\"value\": \"$_cfullchain\"}" "$URL/fullchain.pem" |
|
|
_post "{\"value\": \"$_cfullchain\"}" "$URL/fullchain.pem" |
|
|
fi |
|
|
fi |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
} |
|
|
} |