Skip to content

Commit 737fead

Browse files
committed
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.
1 parent b401b09 commit 737fead

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

contrib/init/bitcoind.openrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ start_pre() {
6969

7070
checkconfig()
7171
{
72-
if ! grep -qs '^rpcpassword=' "${BITCOIND_CONFIGFILE}" ; then
72+
if grep -qs '^rpcuser=' "${BITCOIND_CONFIGFILE}" && \
73+
! grep -qs '^rpcpassword=' "${BITCOIND_CONFIGFILE}" ; then
7374
eerror ""
7475
eerror "ERROR: You must set a secure rpcpassword to run bitcoind."
7576
eerror "The setting must appear in ${BITCOIND_CONFIGFILE}"

0 commit comments

Comments
 (0)