diff --git a/misc/launchd/README.md b/misc/launchd/README.md new file mode 100644 index 000000000..ab0ed2fc5 --- /dev/null +++ b/misc/launchd/README.md @@ -0,0 +1,9 @@ +# ipfs launchd agent + +A bare-bones launchd agent file for ipfs. To have launchd automatically run the ipfs daemon for you, do the following: + + mkdir -p ~/Library/LaunchAgents + cp misc/launchctl/io.ipfs.ipfs-daemon.plist ~/Library/LaunchAgents/ + launchctl load ~/Library/LaunchAgents/io.ipfs.ipfs-daemon.plist + +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. diff --git a/misc/launchd/io.ipfs.ipfs-daemon.plist b/misc/launchd/io.ipfs.ipfs-daemon.plist new file mode 100644 index 000000000..2012623a6 --- /dev/null +++ b/misc/launchd/io.ipfs.ipfs-daemon.plist @@ -0,0 +1,22 @@ + + + + + KeepAlive + + Label + io.ipfs.ipfs-daemon + ProgramArguments + + ipfs + daemon + + RunAtLoad + + StandardErrorPath + /usr/local/var/log/ipfs.err + StandardOutPath + /usr/local/var/log/ipfs.log + + +