Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
ae035deb
Commit
ae035deb
authored
Jul 18, 2023
by
sg1888
Browse files
Fixed shell check errors
parent
edd1b60c
Changes
1
Hide whitespace changes
Inline
Side-by-side
deploy/panos.sh
View file @
ae035deb
...
...
@@ -15,7 +15,6 @@
# The script will automatically generate a new API key if
# no key is found, or if a saved key has expired or is invalid.
# This function is to parse the XML response from the firewall
parse_response
()
{
type
=
$2
...
...
@@ -130,6 +129,8 @@ panos_deploy() {
_cdomain
=
$(
echo
"
$1
"
|
sed
's/*/WILDCARD_/g'
)
#Wildcard Safe Filename
_ckey
=
"
$2
"
_cfullchain
=
"
$5
"
_regen_keys
=
false
#Flag to regenerate keys if PANOS_USER or PANOS_PASS changes.
# VALID FILE CHECK
if
[
!
-f
"
$_ckey
"
]
||
[
!
-f
"
$_cfullchain
"
]
;
then
...
...
@@ -164,15 +165,22 @@ panos_deploy() {
_getdeployconf PANOS_PASS
fi
# PANOS_KEY
_getdeployconf PANOS_KEY
if
[
"
$PANOS_KEY
"
]
;
then
_debug
"Detected saved key."
_panos_key
=
$PANOS_KEY
else
_debug
"No key detected"
unset
_panos_key
fi
#Store variables
_panos_host
=
$PANOS_HOST
_panos_user
=
$PANOS_USER
_panos_pass
=
$PANOS_PASS
#Load saved keys
_getdeployconf PANOS_KEY
_panos_key
=
$PANOS_KEY
#Test API Key if found. If the key is invalid, the variable _panos_key will be unset.
if
[
"
$_panos_host
"
]
&&
[
"
$_panos_key
"
]
;
then
...
...
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