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
cbdb8bd9
Commit
cbdb8bd9
authored
Feb 11, 2020
by
Paul Nguyen
Browse files
Fixing gitdiff
parent
5dcb4176
Changes
1
Hide whitespace changes
Inline
Side-by-side
deploy/panos.sh
View file @
cbdb8bd9
...
@@ -42,11 +42,11 @@ deployer() {
...
@@ -42,11 +42,11 @@ deployer() {
fi
fi
if
[
"
$type
"
=
'cert'
]
||
[
"
$type
"
=
'key'
]
;
then
if
[
"
$type
"
=
'cert'
]
||
[
"
$type
"
=
'key'
]
;
then
#Generate DEIM
#Generate DEIM
delim
=
"-----MultipartDelimiter
$(
date
"+%s%N"
)
"
delim
=
"-----MultipartDelimiter
$(
date
"+%s%N"
)
"
nl
=
"
\0
15
\0
12"
nl
=
"
\0
15
\0
12"
#Set Header
#Set Header
export
_H1
=
"Content-Type: multipart/form-data; boundary=
$delim
"
export
_H1
=
"Content-Type: multipart/form-data; boundary=
$delim
"
if
[
"
$type
"
=
'cert'
]
;
then
if
[
"
$type
"
=
'cert'
]
;
then
content
=
"
$content
${
nl
}
--
$delim
${
nl
}
Content-Disposition: form-data; name=
\"
type
\"\r\n\r\n\r\n
import"
content
=
"
$content
${
nl
}
--
$delim
${
nl
}
Content-Disposition: form-data; name=
\"
type
\"\r\n\r\n\r\n
import"
...
@@ -76,7 +76,6 @@ deployer() {
...
@@ -76,7 +76,6 @@ deployer() {
cmd
=
$(
printf
"%s"
"<commit><partial><
$_panos_user
></
$_panos_user
></partial></commit>"
| _url_encode
)
cmd
=
$(
printf
"%s"
"<commit><partial><
$_panos_user
></
$_panos_user
></partial></commit>"
| _url_encode
)
content
=
"type=commit&key=
$_panos_key
&cmd=
$cmd
"
content
=
"type=commit&key=
$_panos_key
&cmd=
$cmd
"
fi
fi
response
=
$(
_post
"
$content
"
"
$panos_url
"
""
"POST"
)
response
=
$(
_post
"
$content
"
"
$panos_url
"
""
"POST"
)
parse_response
"
$response
"
"
$type
"
parse_response
"
$response
"
"
$type
"
# Saving response to variables
# Saving response to variables
...
@@ -145,4 +144,4 @@ panos_deploy() {
...
@@ -145,4 +144,4 @@ panos_deploy() {
deployer commit
deployer commit
fi
fi
fi
fi
}
}
\ No newline at end of file
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