doc/MacRunOnBoot: org.torproject.tor.2.plist

File org.torproject.tor.2.plist, 1.9 KB (added by teor, 4 years ago)

Example tor launchd plist for OS X 10.10 Yosemite

Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!-- Add a ":" between the "http" and "//" in the next line -->
3<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http//www.apple.com/DTDs/PropertyList-1.0.dtd">
4<plist version="1.0">
5<dict>
6        <key>Label</key>
7        <string>org.torproject.tor</string>
8        <key>ProgramArguments</key>
9        <array>
10        <!-- Replace /opt/local/bin/tor with your tor binary path -->
11        <string>/opt/local/bin/tor</string>
12        <string>-f</string>
13        <!-- Replace /opt/local/etc/tor/ with your tor data directory path  -->
14        <string>/opt/local/etc/tor/torrc</string>
15        </array>
16        <!-- Replace /opt/local/etc/tor/ with your tor data directory path  -->
17        <key>StandardOutPath</key>
18        <string>/opt/local/etc/tor/stdout.log</string>
19        <!-- Replace /opt/local/etc/tor/ with your tor data directory path  -->
20        <key>StandardErrorPath</key>
21        <string>/opt/local/etc/tor/stderr.log</string>
22        <!-- Replace doug with your short OS X username -->
23        <key>UserName</key>
24        <string>doug</string>
25        <!-- How long OS X will give tor to shut down connections before restarting it. Decrease for faster reboots, increase to allow users to find other relays. -->
26        <key>ExitTimeOut</key>
27        <integer>60</integer>
28        <!-- How much CPU priority tor will get, from 20 (low) to -20 (high) -->
29        <key>Nice</key>
30        <integer>15</integer>
31        <key>HardResourceLimits</key>
32        <dict>
33        <!-- How many connections tor can make, for a relay, this should be at least the number of relays in the network, or around 8000 -->
34        <!-- You may also need to add "kern.maxfiles=20480" to /etc/sysctl.conf -->
35        <key>NumberOfFiles</key>
36        <integer>10240</integer>
37        </dict>
38        <key>RunAtLoad</key>
39        <true/>
40        <key>KeepAlive</key>                                                         
41        <true/>
42        <key>ProcessType</key>
43        <string>Background</string>
44        <key>LowPriorityIO</key>
45        <true/>
46        <!-- If any keys are not implemented in your version of OS X, please feel free to delete them -->
47</dict>
48</plist>