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
668894fc
Unverified
Commit
668894fc
authored
Jun 23, 2022
by
neil
Committed by
GitHub
Jun 23, 2022
Browse files
Update proxmoxve.sh
parent
799f509b
Changes
1
Hide whitespace changes
Inline
Side-by-side
deploy/proxmoxve.sh
View file @
668894fc
...
@@ -51,7 +51,7 @@ proxmoxve_deploy(){
...
@@ -51,7 +51,7 @@ proxmoxve_deploy(){
_getdeployconf DEPLOY_PROXMOXVE_NODE_NAME
_getdeployconf DEPLOY_PROXMOXVE_NODE_NAME
if
[
-z
"
$DEPLOY_PROXMOXVE_NODE_NAME
"
]
;
then
if
[
-z
"
$DEPLOY_PROXMOXVE_NODE_NAME
"
]
;
then
_node_name
=
$(
echo
"
$_target_hostname
"
|
cut
-d
.
-f1
)
_node_name
=
$(
echo
"
$_target_hostname
"
|
cut
-d
.
-f1
)
else
else
_node_name
=
"
$DEPLOY_PROXMOXVE_NODE_NAME
"
_node_name
=
"
$DEPLOY_PROXMOXVE_NODE_NAME
"
_savedeployconf DEPLOY_PROXMOXVE_NODE_NAME
"
$DEPLOY_PROXMOXVE_NODE_NAME
"
_savedeployconf DEPLOY_PROXMOXVE_NODE_NAME
"
$DEPLOY_PROXMOXVE_NODE_NAME
"
...
@@ -92,7 +92,7 @@ proxmoxve_deploy(){
...
@@ -92,7 +92,7 @@ proxmoxve_deploy(){
# This is required.
# This is required.
_getdeployconf DEPLOY_PROXMOXVE_API_TOKEN_KEY
_getdeployconf DEPLOY_PROXMOXVE_API_TOKEN_KEY
if
[
-z
"
$DEPLOY_PROXMOXVE_API_TOKEN_KEY
"
]
;
then
if
[
-z
"
$DEPLOY_PROXMOXVE_API_TOKEN_KEY
"
]
;
then
_err
"API key not provided."
_err
"API key not provided."
return
1
return
1
else
else
...
@@ -111,7 +111,8 @@ proxmoxve_deploy(){
...
@@ -111,7 +111,8 @@ proxmoxve_deploy(){
#
#
# This dumps the json payload to a variable that should be passable to the
# This dumps the json payload to a variable that should be passable to the
# _psot function.
# _psot function.
_json_payload
=
$(
cat
<<
HEREDOC
_json_payload
=
$(
cat
<<
HEREDOC
{
{
"certificates": "
$(
tr
'\n'
':'
<
"
$_cfullchain
"
|
sed
's/:/\\n/g'
)
",
"certificates": "
$(
tr
'\n'
':'
<
"
$_cfullchain
"
|
sed
's/:/\\n/g'
)
",
"key": "
$(
tr
'\n'
':'
<
"
$_ckey
"
|sed
's/:/\\n/g'
)
",
"key": "
$(
tr
'\n'
':'
<
"
$_ckey
"
|sed
's/:/\\n/g'
)
",
...
@@ -120,9 +121,9 @@ proxmoxve_deploy(){
...
@@ -120,9 +121,9 @@ proxmoxve_deploy(){
"force":"1"
"force":"1"
}
}
HEREDOC
HEREDOC
)
)
_debug2 Payload
"
$_json_payload
"
_debug2 Payload
"
$_json_payload
"
# Push certificates to server.
# Push certificates to server.
export
_HTTPS_INSECURE
=
1
export
_HTTPS_INSECURE
=
1
export
_H1
=
"Authorization: PVEAPIToken=
${
_proxmoxve_header_api_token
}
"
export
_H1
=
"Authorization: PVEAPIToken=
${
_proxmoxve_header_api_token
}
"
...
...
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