mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-21 10:27:46 +08:00
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.
This commit is contained in:
parent
cc5f6bb306
commit
904ce1080e
9
misc/launchd/README.md
Normal file
9
misc/launchd/README.md
Normal file
@ -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.
|
||||
22
misc/launchd/io.ipfs.ipfs-daemon.plist
Normal file
22
misc/launchd/io.ipfs.ipfs-daemon.plist
Normal file
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>KeepAlive</key>
|
||||
<true/>
|
||||
<key>Label</key>
|
||||
<string>io.ipfs.ipfs-daemon</string>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>ipfs</string>
|
||||
<string>daemon</string>
|
||||
</array>
|
||||
<key>RunAtLoad</key>
|
||||
<true/>
|
||||
<key>StandardErrorPath</key>
|
||||
<string>/usr/local/var/log/ipfs.err</string>
|
||||
<key>StandardOutPath</key>
|
||||
<string>/usr/local/var/log/ipfs.log</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user