diff options
author | Li-Wen Hsu <lwhsu@FreeBSD.org> | 2017-08-01 16:45:32 +0000 |
---|---|---|
committer | Li-Wen Hsu <lwhsu@FreeBSD.org> | 2017-08-01 16:45:32 +0000 |
commit | 67ff3911521ef6338aa79a7b07e263baadd6fcf2 (patch) | |
tree | cd42b5654657230c51bab1c5481568068575f3fe /net-p2p/bitcoin/files/bitcoind.in | |
parent | Update WWW to a working URL. (diff) |
- net-p2p/bitcoin: fix path error in startup script files/bitcoin.in also
removes reliance on unnecessary cli script.
- net-p2p/bitcoin-daemon: create the user/group for the daemon to use also
install a sample configuration file.
With these two patches a "pkg install bitcoin-daemon" followed by "service
start bitcoind" will be sufficient to run as a non-privileged user and
automatically connect to bitcoin live network; using /var/db/bitcoin to store
blockchain data.
PR: 215059
Submitted by: Christopher Hall <hsw@bitmark.com>
Approved by: <robbak@robbak.com> (maintainer)
Notes
Notes:
svn path=/head/; revision=447030
Diffstat (limited to 'net-p2p/bitcoin/files/bitcoind.in')
-rw-r--r-- | net-p2p/bitcoin/files/bitcoind.in | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/net-p2p/bitcoin/files/bitcoind.in b/net-p2p/bitcoin/files/bitcoind.in index 45bc454c171d..e620d9dcc4fb 100644 --- a/net-p2p/bitcoin/files/bitcoind.in +++ b/net-p2p/bitcoin/files/bitcoind.in @@ -12,7 +12,7 @@ # bitcoind_user (str) Set to "bitcoin" by default. # bitcoind_group (str) Set to "bitcoin" by default. # bitcoind_conf (str) Set to "%%PREFIX%%/etc/bitcoind.conf" by default. -# bitcoind_data (str) Set to "/var/lib/bitcoind" by default. +# bitcoind_data (str) Set to "/var/lib/bitcoin" by default. # bitcoindlimits_enable (bool) Set to "NO" by default. # Set it to "YES" to enable bitcoindlimits # bitcoindlimits_args Set to "-e -U ${bitcoind_user}" by default @@ -32,7 +32,6 @@ status_cmd="bitcoind_status" stop_cmd="bitcoind_stop" stop_postcmd="bitcoind_wait" command="%%PREFIX%%/bin/bitcoind" -cli_command="%%PREFIX%%/bin/bitcoin-cli" daemon_command="/usr/sbin/daemon" #pidfile="/var/run/${name}.pid" extra_commands="configtest" @@ -45,7 +44,7 @@ load_rc_config ${name} : ${bitcoind_user:="bitcoin"} : ${bitcoind_group:="bitcoin"} -: ${bitcoind_data_dir:="/var/db/bitcoind"} +: ${bitcoind_data_dir:="/var/db/bitcoin"} : ${bitcoind_config_file:="%%PREFIX%%/etc/bitcoin.conf"} : ${bitcoindlimits_args:="-e -U ${bitcoind_user}"} @@ -134,7 +133,7 @@ bitcoind_stop() echo "Bitcoind is not running" return 1 else - ${cli_command} -conf="${bitcoind_config_file}" -datadir="${bitcoind_data_dir}" stop + kill ${pid} fi } |