@cryptotaxi247 / kubo / commits / 904ce1080

Add launchctl agent plist for OSX

I found this useful to have, and figured it might save somebody else a few minutes of re-inventing the wheel.

Stephen Sugden committed Apr 30, 2015 at 16:54 UTC 904ce1080e0ba14754d5ed05befb7ae8f2f56a84
2 files changed +31
misc/launchd/README.md new
+9
@@ -0,0 +1,9 @@
1 +# ipfs launchd agent
2 +
3 +A bare-bones launchd agent file for ipfs. To have launchd automatically run the ipfs daemon for you, do the following:
4 +
5 + mkdir -p ~/Library/LaunchAgents
6 + cp misc/launchctl/io.ipfs.ipfs-daemon.plist ~/Library/LaunchAgents/
7 + launchctl load ~/Library/LaunchAgents/io.ipfs.ipfs-daemon.plist
8 +
9 +Note that the `ipfs` binary must be on the *system* PATH for this to work. Adding a symlink in /usr/bin works well enough for me.
misc/launchd/io.ipfs.ipfs-daemon.plist new
+22
@@ -0,0 +1,22 @@
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>KeepAlive</key>
6 + <true/>
7 + <key>Label</key>
8 + <string>io.ipfs.ipfs-daemon</string>
9 + <key>ProgramArguments</key>
10 + <array>
11 + <string>ipfs</string>
12 + <string>daemon</string>
13 + </array>
14 + <key>RunAtLoad</key>
15 + <true/>
16 + <key>StandardErrorPath</key>
17 + <string>/usr/local/var/log/ipfs.err</string>
18 + <key>StandardOutPath</key>
19 + <string>/usr/local/var/log/ipfs.log</string>
20 + </dict>
21 +</plist>
22 +