|
|
|
@ -62,8 +62,7 @@ kong_deploy() {
|
|
|
|
|
#Check if ssl plugins is aready enabled (if not => POST else => PATCH)
|
|
|
|
|
ssl_uuid=$(_get "$KONG_URL/apis/$uuid/plugins" | _egrep_o '"id":"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"[a-zA-Z0-9\-\,\"_\:]*"name":"ssl"' | _egrep_o '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}')
|
|
|
|
|
_debug ssl_uuid "$ssl_uuid"
|
|
|
|
|
if [ "$ssl_uuid" = "" ]
|
|
|
|
|
then
|
|
|
|
|
if [ "$ssl_uuid" = "" ]; then
|
|
|
|
|
#Post certificate to Kong
|
|
|
|
|
response=$(_post "$content" "$KONG_URL/apis/$uuid/plugins" "" "POST")
|
|
|
|
|
else
|
|
|
|
|