getssl icon indicating copy to clipboard operation
getssl copied to clipboard

The RELOAD_CMD "ssh ... reload" is not seen as an ssh command and the much needed sleep is not executed.

Open Dominic-Mayers opened this issue 2 years ago • 0 comments

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

  1. In my config file, the reload command was ssh user@domain service nginx reload
  2. I executed getssl domain
  3. It complained that the certificate is not the same on the server
  4. I checked with my browser that a new certificate was properly installed.
  5. 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)

Dominic-Mayers avatar Apr 18 '22 13:04 Dominic-Mayers