0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-03-05 14:06:27 -05:00

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 2021-02-08 11:27:16 +01:00
parent b401b09355
commit 737feadff7
No known key found for this signature in database
GPG key ID: 6B636BF0493EE747

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}"