Improve OpenRC initscript #21111

pull parazyd wants to merge 2 commits into bitcoin:master from parazyd:openrc-init-improve changing 1 files +4 −3
  1. parazyd commented at 10:36 AM on February 8, 2021: contributor

    This pull request improves the available OpenRC initscripts in contrib/init.

    The first commit (737feadff7c026412039774de0d10931fe0c5bcc) reworks checkconfig() to not fail if both rpcuser and rpcpassword are unset, because this implies that bitcoind shall use the .cookie file for RPC authentication. Currently, the initscript does not allow starting bitcoind without a set rpcuser and rpcpassword.

    The second commit (95f97111dd27f32dfcb461c9dd6890aa8d1355ed) simply quotes some unquoted variables.

  2. DrahtBot added the label Scripts and tools on Feb 8, 2021
  3. parazyd commented at 7:53 PM on February 10, 2021: contributor

    Cc: @luke-jr

  4. in contrib/init/bitcoind.openrc:72 in 3e65d9b4d5 outdated
      70 |  }
      71 |  
      72 |  checkconfig()
      73 |  {
      74 | -	if ! grep -qs '^rpcpassword=' "${BITCOIND_CONFIGFILE}" ; then
      75 | +
    


    luke-jr commented at 10:47 PM on February 10, 2021:

    Why a blank line?


    parazyd commented at 10:53 PM on February 10, 2021:

    Typo. Let me know about the warning below, and I can forcepush.

  5. in contrib/init/bitcoind.openrc:104 in 3e65d9b4d5 outdated
      99 | +		ewarn ""
     100 | +		ewarn "ie: alertnotify=echo %%s | mail -s \"Bitcoin Alert\"" \
     101 | +			"admin@foo.com"
     102 | +		ewarn ""
     103 | +		return 0
     104 | +	fi
    


    luke-jr commented at 10:48 PM on February 10, 2021:

    This seems excessive.


    parazyd commented at 10:51 PM on February 10, 2021:

    I wanted to keep it since the existing script was also notifying about it. Do you think this part should be removed?


    luke-jr commented at 11:19 PM on February 10, 2021:

    The existing notice is when misconfigured, not every time you start it.

  6. 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.
    737feadff7
  7. contrib/init: (OpenRC) quote some unquoted variables. 95f97111dd
  8. parazyd force-pushed on Feb 10, 2021
  9. parazyd commented at 11:21 PM on February 10, 2021: contributor

    Updated. Thank you for the review.

  10. luke-jr approved
  11. luke-jr commented at 11:27 PM on February 10, 2021: member

    utACK

  12. kristapsk approved
  13. kristapsk commented at 1:24 AM on February 12, 2021: contributor

    ACK 95f97111dd27f32dfcb461c9dd6890aa8d1355ed

  14. parazyd commented at 9:02 AM on February 28, 2021: contributor

    bump

  15. trongham approved
  16. kristapsk commented at 2:13 AM on March 1, 2021: contributor

    LGTM! Changes are simple and I have actually tested them.

  17. parazyd commented at 2:18 PM on March 13, 2021: contributor

    Bump

  18. MarcoFalke merged this on Mar 13, 2021
  19. MarcoFalke closed this on Mar 13, 2021

  20. sidhujag referenced this in commit 93879152ec on Mar 13, 2021
  21. luke-jr referenced this in commit 4551cfdfde on Jun 27, 2021
  22. luke-jr referenced this in commit 58b4729c36 on Jun 27, 2021
  23. PastaPastaPasta referenced this in commit e427a2941f on Jun 27, 2021
  24. PastaPastaPasta referenced this in commit 83cc2adde2 on Jun 28, 2021
  25. PastaPastaPasta referenced this in commit 0e2c21641b on Jun 29, 2021
  26. PastaPastaPasta referenced this in commit 8433d0c9fb on Jul 1, 2021
  27. PastaPastaPasta referenced this in commit 6eccc9631c on Jul 1, 2021
  28. PastaPastaPasta referenced this in commit ebbe5a45a1 on Jul 15, 2021
  29. PastaPastaPasta referenced this in commit e07e289e0a on Jul 16, 2021
  30. DrahtBot locked this on Aug 16, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-19 09:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me