getssl
getssl copied to clipboard
The RELOAD_CMD "ssh ... reload" is not seen as an ssh command and the much needed sleep is not executed.
Describe the issue A reload command "ssh domain command" is not seen as an ssh command.
It just that if you define RELOAD_CMD="ssh root@${DOMAIN} service nginx reload"
instead of RELOAD_CMD=("ssh:root@${DOMAIN}:service nginx reload")
(i.e. using bash array), then the code does not know that you are running a ssh command and it does not sleep after and it sees the old certificate when it checks it.
To Reproduce
- In my config file, the reload command was
ssh user@domain service nginx reload
- I executed
getssl domain
- It complained that the certificate is not the same on the server
- I checked with my browser that a new certificate was properly installed.
- As an extra check, I added a sleep after the reload command (which is not seen as an ssh command by getssl) and executed again
getssl domain
to confirm that it is just that a sleep was needed.
Expected behavior
I expect that getssl detects that ssh user@domain service nginx reload
is an ssh command and adds a required sleep after or sends a warning that an ssh command must be in the format ("ssh:domain:command")
(i.e. using bash array).
Operating system (please complete the following information):
- OS: Ubuntu 21.10 impish
- GNU bash, version 5.1.8(1)-release (x86_64-pc-linux-gnu)