Release EXIT signal trap if SSH failed.
ssh access should not be attempted again if the reason the program is exiting is because ssh access failed.
I also think that the program should not print help messages to stdout when it is behaving under normal parameters. The error message received from ssh is self-explanatory.
Hi @Myridium, thanks for your contribution. It is indeed a good idea to disable the ssh trap.
I would however like to keep the help messages. It may be better to forward them to stderr, but the script calls ssh with non-conventional settings which may confuse users (e.g. password authentication is disabled and in some cases EC-keys won't work). Not all users are familiar with ssh or scripting in general.
@rien that's okay, I agree. No need to make the script less accessible. Your code is written nicely so it's easy to remove if need be. Thanks for your work.
This change is added in https://github.com/rien/reStream/commit/3ad7c1700b0fbf77b999e2ec2602f0ddc37c01ab