I'm making script for backing up data from server, it's gonna use ssh and scp many times. My private key is password-protected, but I'm using environment without any ssh agent.
I'd like to put condition to script, that check whether script is launched using this answer. If there is no ssh agent running, I would like to use
exec ssh-agent <original script relaunch>.
How to do that?