I'm trying to run autossh with launchd.
My autossh script is one line and runs fine from the command line:
But it fails when run from this launchd plist:
I know that it's loaded:
Any ideas?
My autossh script is one line and runs fine from the command line:
Code:
/opt/local/bin/autossh -M 0 -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" -R 19990:localhost:22 mnewman@korat.myddns.rocks -p 10000
But it fails when run from this launchd plist:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>com.mgnewman.autossh</string>
<key>ProgramArguments</key>
<array>
<string>/Users/mnewman/bin/autossh.sh</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
I know that it's loaded:
Code:
Axe:launchagents mnewman$ launchctl load com.mgnewman.autossh.plist
com.mgnewman.autossh: Already loaded
Any ideas?