Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
3e1418d6
Unverified
Commit
3e1418d6
authored
Feb 12, 2017
by
Armando Lüscher
Browse files
Use gloo item key for environment change, to support different account types.
(this isn't working 100% yet, still looking for a solution)
parent
884f70fb
Changes
1
Show whitespace changes
Inline
Side-by-side
dnsapi/dns_cyon.sh
View file @
3e1418d6
...
@@ -210,7 +210,10 @@ _cyon_change_domain_env() {
...
@@ -210,7 +210,10 @@ _cyon_change_domain_env() {
domain_env
=
"
$(
printf
"%s"
"
${
fulldomain
}
"
|
sed
-E
-e
's/.*\.(.*\..*)$/\1/'
)
"
domain_env
=
"
$(
printf
"%s"
"
${
fulldomain
}
"
|
sed
-E
-e
's/.*\.(.*\..*)$/\1/'
)
"
_debug
"Changing domain environment to
${
domain_env
}
"
_debug
"Changing domain environment to
${
domain_env
}
"
domain_env_url
=
"https://my.cyon.ch/user/environment/setdomain/d/
${
domain_env
}
/gik/domain%3A
${
domain_env
}
"
gloo_item_key
=
"
$(
_get
"https://my.cyon.ch/domain/"
|
tr
'\n'
' '
|
sed
-E
-e
"s/.*data-domain=
\"
${
domain_env
}
\"
[^<]*data-itemkey=
\"
([^
\"
]*).*/
\1
/"
)
"
_debug gloo_item_key
"
${
gloo_item_key
}
"
domain_env_url
=
"https://my.cyon.ch/user/environment/setdomain/d/
${
domain_env
}
/gik/
${
gloo_item_key
}
"
domain_env_response
=
"
$(
_get
"
${
domain_env_url
}
"
)
"
domain_env_response
=
"
$(
_get
"
${
domain_env_url
}
"
)
"
_debug domain_env_response
"
${
domain_env_response
}
"
_debug domain_env_response
"
${
domain_env_response
}
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment