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
df671a77
Commit
df671a77
authored
Jan 16, 2022
by
Ross Shen
Committed by
neilpang
Jan 19, 2022
Browse files
routeros deploy hook: store the env vars within the domainconf
related to #2344 and #2413
parent
658d09ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
deploy/routeros.sh
View file @
df671a77
...
@@ -66,21 +66,31 @@ routeros_deploy() {
...
@@ -66,21 +66,31 @@ routeros_deploy() {
_debug _cca
"
$_cca
"
_debug _cca
"
$_cca
"
_debug _cfullchain
"
$_cfullchain
"
_debug _cfullchain
"
$_cfullchain
"
_getdeployconf ROUTER_OS_HOST
if
[
-z
"
$ROUTER_OS_HOST
"
]
;
then
if
[
-z
"
$ROUTER_OS_HOST
"
]
;
then
_debug
"Using _cdomain as ROUTER_OS_HOST, please set if not correct."
_debug
"Using _cdomain as ROUTER_OS_HOST, please set if not correct."
ROUTER_OS_HOST
=
"
$_cdomain
"
ROUTER_OS_HOST
=
"
$_cdomain
"
fi
fi
_getdeployconf ROUTER_OS_USERNAME
if
[
-z
"
$ROUTER_OS_USERNAME
"
]
;
then
if
[
-z
"
$ROUTER_OS_USERNAME
"
]
;
then
_err
"Need to set the env variable ROUTER_OS_USERNAME"
_err
"Need to set the env variable ROUTER_OS_USERNAME"
return
1
return
1
fi
fi
_getdeployconf ROUTER_OS_ADDITIONAL_SERVICES
if
[
-z
"
$ROUTER_OS_ADDITIONAL_SERVICES
"
]
;
then
if
[
-z
"
$ROUTER_OS_ADDITIONAL_SERVICES
"
]
;
then
_debug
"Not enabling additional services"
_debug
"Not enabling additional services"
ROUTER_OS_ADDITIONAL_SERVICES
=
""
ROUTER_OS_ADDITIONAL_SERVICES
=
""
fi
fi
_savedeployconf ROUTER_OS_HOST
"
$ROUTER_OS_HOST
"
_savedeployconf ROUTER_OS_USERNAME
"
$ROUTER_OS_USERNAME
"
_savedeployconf ROUTER_OS_ADDITIONAL_SERVICES
"
$ROUTER_OS_ADDITIONAL_SERVICES
"
_info
"Trying to push key '
$_ckey
' to router"
_info
"Trying to push key '
$_ckey
' to router"
scp
"
$_ckey
"
"
$ROUTER_OS_USERNAME
@
$ROUTER_OS_HOST
:
$_cdomain
.key"
scp
"
$_ckey
"
"
$ROUTER_OS_USERNAME
@
$ROUTER_OS_HOST
:
$_cdomain
.key"
_info
"Trying to push cert '
$_cfullchain
' to router"
_info
"Trying to push cert '
$_cfullchain
' to router"
...
...
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