routeros: add SSH/SCP command adoption

abiessmann 2022-03-17 14:46:31 +01:00
parent 5607de4009
commit 8be8584973

@ -542,7 +542,7 @@ acme.sh --deploy -d ftp.example.com --deploy-hook routeros
The deploy script will remove previously deployed certificates,
and it does this with an assumption on how RouterOS names imported
certificates, adding a "cer_0" suffix at the end. This is true for
versions 6.32 -> 6.41.3, but it is not guaranteed that it will be
versions 6.32 -> 6.41.3 and 7.1.3, but it is not guaranteed that it will be
true for future versions when upgrading.
If the router have other certificates with the same name as the one
@ -558,6 +558,16 @@ export ROUTER_OS_ADDITIONAL_SERVICES="/ip service set api-ssl certificate=$_cdom
```
returns 0 means success, otherwise error.
To adopt parameters to `scp` and/or `ssh` set the optional
`ROUTER_OS_SSH_CMD` and `ROUTER_OS_SCP_CMD` variables accordingly,
see ssh(1) and scp(1) for parameters to those commands.
Example:
```sh
export ROUTER_OS_SSH_CMD="ssh -i /acme.sh/.ssh/router.example.com -o UserKnownHostsFile=/acme.sh/.ssh/known_hosts"
export ROUTER_OS_SCP_CMD="scp -i /acme.sh/.ssh/router.example.com -o UserKnownHostsFile=/acme.sh/.ssh/known_hosts"
````
If there are any bugs for routeros hook,
please report here: https://github.com/Neilpang/acme.sh/issues/2344