diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-10-26 17:41:48 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-10-26 17:42:00 +0100 |
commit | dbc5ee821ecdd720b4d8ef9dc8b68d7cd1b87839 (patch) | |
tree | cf6d863ae51fbce2b1a4fb4411bae41f6cfe53fe | |
parent | c8322ff7f7544ac38cdc8df89058f434bb1498e6 (diff) | |
parent | e04b0b6b835483e7052a24b0224a6023e233d049 (diff) |
Merge pull request #6621
e04b0b6 added OS X documentation to doc/init.md (Kevin Cooper)
d4aa54c added org.bitcoin.bitcoind.plist for launchd (OS X) (Kevin Cooper)
-rw-r--r-- | contrib/init/README.md | 1 | ||||
-rw-r--r-- | contrib/init/org.bitcoin.bitcoind.plist | 15 | ||||
-rw-r--r-- | doc/init.md | 23 |
3 files changed, 38 insertions, 1 deletions
diff --git a/contrib/init/README.md b/contrib/init/README.md index 0d19da3039..eb5d30acce 100644 --- a/contrib/init/README.md +++ b/contrib/init/README.md @@ -5,6 +5,7 @@ Upstart: bitcoind.conf OpenRC: bitcoind.openrc bitcoind.openrcconf CentOS: bitcoind.init +OS X: org.bitcoin.bitcoind.plist have been made available to assist packagers in creating node packages here. diff --git a/contrib/init/org.bitcoin.bitcoind.plist b/contrib/init/org.bitcoin.bitcoind.plist new file mode 100644 index 0000000000..e94cd4466d --- /dev/null +++ b/contrib/init/org.bitcoin.bitcoind.plist @@ -0,0 +1,15 @@ +<?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>Label</key> + <string>org.bitcoin.bitcoind</string> + <key>ProgramArguments</key> + <array> + <string>/usr/local/bin/bitcoind</string> + <string>-daemon</string> + </array> + <key>RunAtLoad</key> + <true/> +</dict> +</plist> diff --git a/doc/init.md b/doc/init.md index d24c2d1dbf..e3db5b05ef 100644 --- a/doc/init.md +++ b/doc/init.md @@ -13,8 +13,9 @@ can be found in the contrib/init folder. 1. Service User --------------------------------- -All three startup configurations assume the existence of a "bitcoin" user +All three Linux startup configurations assume the existence of a "bitcoin" user and group. They must be created before attempting to use these scripts. +The OS X configuration assumes bitcoind will be set up for the current user. 2. Configuration --------------------------------- @@ -48,6 +49,8 @@ see `contrib/debian/examples/bitcoin.conf`. 3. Paths --------------------------------- +3a) Linux + All three configurations assume several paths that might need to be adjusted. Binary: `/usr/bin/bitcoind` @@ -62,6 +65,13 @@ reasons to make the configuration file and data directory only readable by the bitcoin user and group. Access to bitcoin-cli and other bitcoind rpc clients can then be controlled by group membership. +3b) Mac OS X + +Binary: `/usr/local/bin/bitcoind` +Configuration file: `~/Library/Application Support/Bitcoin/bitcoin.conf` +Data directory: `~/Library/Application Support/Bitcoin` +Lock file: `~/Library/Application Support/Bitcoin/.lock` + 4. Installing Service Configuration ----------------------------------- @@ -97,6 +107,17 @@ Using this script, you can adjust the path and flags to the bitcoind program by setting the BITCOIND and FLAGS environment variables in the file /etc/sysconfig/bitcoind. You can also use the DAEMONOPTS environment variable here. +4e) Mac OS X + +Copy org.bitcoin.bitcoind.plist into ~/Library/LaunchAgents. Load the launch agent by +running `launchctl load ~/Library/LaunchAgents/org.bitcoin.bitcoind.plist`. + +This Launch Agent will cause bitcoind to start whenever the user logs in. + +NOTE: This approach is intended for those wanting to run bitcoind as the current user. +You will need to modify org.bitcoin.bitcoind.plist if you intend to use it as a +Launch Daemon with a dedicated bitcoin user. + 5. Auto-respawn ----------------------------------- |