modified: pixi.toml
[GalaxyCodeBases.git] / etc / Mac / me.Galaxy.AutoSSHem1.plist
blob7b639e866ef11cd1df388d191fb0a74da8b47401
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.AutoSSHem1</string>
7 <key>UserName</key>
8 <string>Galaxy</string>
9 <key>EnvironmentVariables</key>
10 <dict>
11 <key>AUTOSSH_POLL</key>
12 <string>59</string>
13 <key>KEYFILE</key>
14 <string>/Users/Galaxy/Dropbox/Galaxy/dotfiles/ssh/GalaxyMini</string>
15 <key>COMMONARG</key>
16 <string>-o ServerAliveInterval=59 -N</string>
17 <key>NoHostKeyCheck</key>
18 <string>-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no</string>
19 </dict>
20 <key>Nice</key>
21 <integer>5</integer>
22 <key>ProgramArguments</key>
23 <array>
24 <string>/bin/bash</string>
25 <string>-c</string>
26 <string>
27 RandomPort='RANDOM % 64000 + 1024'; \
28 date; \
29 /usr/local/bin/autossh -M $(($RandomPort)) -f galaxy@2403:3a00:202:1129:49:212:210:128 -p 26386 -C -D7575 $COMMONARG; \
30 /usr/local/bin/autossh -M $(($RandomPort)) -f luolab@eeb-zhanglab.eeb.lsa.umich.edu -C -D8000 $COMMONARG; \
31 echo 1.;
32 </string>
33 </array>
34 <key>RunAtLoad</key>
35 <true/>
36 <key>KeepAlive</key>
37 <dict>
38 <key>SuccessfulExit</key>
39 <false/>
40 </dict>
41 <key>StandardOutPath</key>
42 <string>/Library/Logs/me.Galaxy.AutoSSHem.log</string>
43 <key>StandardErrorPath</key>
44 <string>/Library/Logs/me.Galaxy.AutoSSHem.log</string>
45 </dict>
46 <!--
47 Embed Version
49 https://github.com/tjluoma/launchd-keepalive
50 https://github.com/grinnan/grintun/blob/master/LaunchDaemons/local.autotunnel.autossh.plist
52 ### Put me in /Library/LaunchDaemons/ as it is "System-wide daemons provided by the administrator". Remember to "sudo chown root:wheel".
53 sudo launchctl unload /Library/LaunchDaemons/me.Galaxy.AutoSSHem1.plist
54 sudo cp me.Galaxy.AutoSSHem1.plist /Library/LaunchDaemons/
55 sudo launchctl load /Library/LaunchDaemons/me.Galaxy.AutoSSHem1.plist
57 sudo launchctl start me.Galaxy.AutoSSHem1
58 sudo launchctl stop me.Galaxy.AutoSSHem1
59 ps -ef|grep autossh|awk '{print $2}'|xargs sudo kill -9
61 sudo rm /Library/Logs/me.Galaxy.AutoSSHem.log
62 -->
63 </plist>