aboutsummaryrefslogtreecommitdiff
path: root/contrib/init
diff options
context:
space:
mode:
authorparazyd <parazyd@dyne.org>2021-02-08 11:27:16 +0100
committerparazyd <parazyd@dyne.org>2021-02-11 00:09:42 +0100
commit737feadff7c026412039774de0d10931fe0c5bcc (patch)
tree4a616d492184df4cb19661b73af80ddb54978cd8 /contrib/init
parentb401b093556f53023d1615f7cff3eb84807c6e8b (diff)
downloadbitcoin-737feadff7c026412039774de0d10931fe0c5bcc.tar.xz
contrib/init: (OpenRC) Do not fail if both rpcuser and rpcpassword are unset.
This implies the .cookie file shall be used for RPC and having _both_ unset in bitcoin.conf should allow bitcoind to start.
Diffstat (limited to 'contrib/init')
-rw-r--r--contrib/init/bitcoind.openrc3
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/init/bitcoind.openrc b/contrib/init/bitcoind.openrc
index 86222295db..876d6d5893 100644
--- a/contrib/init/bitcoind.openrc
+++ b/contrib/init/bitcoind.openrc
@@ -69,7 +69,8 @@ start_pre() {
checkconfig()
{
- if ! grep -qs '^rpcpassword=' "${BITCOIND_CONFIGFILE}" ; then
+ if grep -qs '^rpcuser=' "${BITCOIND_CONFIGFILE}" && \
+ ! grep -qs '^rpcpassword=' "${BITCOIND_CONFIGFILE}" ; then
eerror ""
eerror "ERROR: You must set a secure rpcpassword to run bitcoind."
eerror "The setting must appear in ${BITCOIND_CONFIGFILE}"