modified: nfig1.py
[GalaxyCodeBases.git] / etc / Mac / me.Galaxy.AutoSSH.plist
blob01e338704df56f99fd3115d5656bb7db7c32faeb
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3 <plist version="1.0">
4 <dict>
5 <key>Label</key>
6 <string>me.Galaxy.AutoSSH</string>
7 <key>UserName</key>
8 <string>Galaxy</string>
9 <key>ProgramArguments</key>
10 <array>
11 <string>bash</string>
12 <string>-c</string>
13 <string>/opt/Galaxy/myAutoSSH.sh</string>
14 </array>
15 <key>RunAtLoad</key>
16 <true/>
17 <key>KeepAlive</key>
18 <dict>
19 <key>NetworkState</key>
20 <true/>
21 <key>SuccessfulExit</key>
22 <false/>
23 </dict>
24 </dict>
25 <!--
26 https://github.com/tjluoma/launchd-keepalive
28 sudo cp myAutoSSH.sh /opt/Galaxy/
30 ### Put me in /Library/LaunchDaemons/ as it is "System-wide daemons provided by the administrator". Remember to "sudo chown root:wheel".
31 sudo launchctl unload /Library/LaunchDaemons/me.Galaxy.AutoSSH.plist
32 sudo cp me.Galaxy.AutoSSH.plist /Library/LaunchDaemons/
33 sudo launchctl load /Library/LaunchDaemons/me.Galaxy.AutoSSH.plist
35 sudo chown root:wheel /Library/LaunchDaemons/me.Galaxy.AutoSSH.plist /opt/Galaxy/myAutoSSH.sh
37 sudo launchctl start me.Galaxy.AutoSSH
38 sudo launchctl stop me.Galaxy.AutoSSH
39 ps -ef|grep autossh|awk '{print $2}'|xargs sudo kill -9
40 -->
41 </plist>