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.
This commit is contained in:
parazyd committed 2021-02-11 00:09:42 +01:00
1 parent b401b09355
commit 737feadff7
1 file changed
+2 -1
+2 -1
View File
@@ -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}"