mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-05-05 19:07:43 +00:00
deploy ssh:move configuration load and validation into separate function
re-factor in support of adding multiple ssh runs with different configurations
This commit is contained in:
parent
6470b0e095
commit
5c8a674d18
@ -43,6 +43,19 @@ ssh_deploy() {
|
|||||||
_debug _cca "$_cca"
|
_debug _cca "$_cca"
|
||||||
_debug _cfullchain "$_cfullchain"
|
_debug _cfullchain "$_cfullchain"
|
||||||
|
|
||||||
|
if ! _ssh_load_config; then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
_deploy_ssh_servers="$DEPLOY_SSH_SERVER"
|
||||||
|
for DEPLOY_SSH_SERVER in $_deploy_ssh_servers; do
|
||||||
|
_ssh_deploy
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
_ssh_load_config() {
|
||||||
|
_deploy_ssh_servers=""
|
||||||
|
|
||||||
# USER is required to login by SSH to remote host.
|
# USER is required to login by SSH to remote host.
|
||||||
_migratedeployconf Le_Deploy_ssh_user DEPLOY_SSH_USER
|
_migratedeployconf Le_Deploy_ssh_user DEPLOY_SSH_USER
|
||||||
_getdeployconf DEPLOY_SSH_USER
|
_getdeployconf DEPLOY_SSH_USER
|
||||||
@ -169,11 +182,6 @@ ssh_deploy() {
|
|||||||
else
|
else
|
||||||
_info "Required commands batched and sent in single call to remote host"
|
_info "Required commands batched and sent in single call to remote host"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
_deploy_ssh_servers="$DEPLOY_SSH_SERVER"
|
|
||||||
for DEPLOY_SSH_SERVER in $_deploy_ssh_servers; do
|
|
||||||
_ssh_deploy
|
|
||||||
done
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_ssh_deploy() {
|
_ssh_deploy() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user