startup script for centos, with documentation. #5847

pull joshrabinowitz wants to merge 1 commits into bitcoin:master from joshrabinowitz:master changing 3 files +79 −1
  1. joshrabinowitz commented at 7:00 AM on March 3, 2015: contributor

    Howdy, here's a pull request for bitcoind startup script for CentOS systems.

    As discussed with ajweiss on IRC.

    Let me know if you have feedback or questions.

  2. laanwj added the label Docs and Output on Mar 3, 2015
  3. paveljanik commented at 8:39 AM on March 3, 2015: contributor

    Please add -disablewallet argument (maybe in the default example sysconfig/bitcoind file?). System-wide service should not have wallet enabled by default.

    Please squash afterwards.

  4. in contrib/init/bitcoind.init:None in 49c1bf5340 outdated
      20 | +
      21 | +prog=bitcoind
      22 | +lockfile=/var/lock/subsys/bitcoind
      23 | +
      24 | +# bitcoind defaults to /usr/sbin/bitcoind
      25 | +bitcoind=${BITCOIND-/usr/sbin/bitcoind}
    


    luke-jr commented at 3:49 PM on March 3, 2015:

    bitcoind is installed to bin, not sbin

  5. luke-jr commented at 3:51 PM on March 3, 2015: member

    Probably would be better to use the same variable names as the existing init script, unless there's some RedHat/CentOS policy on how the variables ought be named.

  6. startup script for centos, with documentation. 723664b5db
  7. joshrabinowitz commented at 4:26 PM on March 3, 2015: contributor

    @luke-jr , @paveljanik : I think I've reflected all the comments that have been input.

    There's been some discussion about the path to bitcoind-- I understand that it's currently installed by default into /usr/bin/bitcoind , but pavel would like it put into /usr/sbin/bitcoind. Please let me know which way I should go with this script.

    Also, looking at this: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/Deployment_Guide/ch-sysconfig.html , there doesn't seem to be much in the way of conventions for env vars used in startup scripts in CentOS/RH systems, so I made them consistent with the file @luke-jr pointed out

  8. paveljanik commented at 4:38 PM on March 3, 2015: contributor

    After a few tests, I'd like to PR installing bitcoind into sbin instead of bin: https://github.com/paveljanik/bitcoin/commit/af092db6c81a6bad6208adaf5f645c8e3c5d6996

  9. luke-jr commented at 4:41 PM on March 3, 2015: member

    Currently bitcoind is installed into bin, and the init script should reflect that. When/if that changes, it can be updated here at that time. (FWIW, I think I disagree with installing bitcoind into sbin, but that is not a conversation for this PR)

  10. joshrabinowitz commented at 4:43 PM on March 3, 2015: contributor

    @luke-jr , @paveljanik : all sounds good to me. Let me know if there's additional feedback on this PR

  11. jgarzik commented at 1:56 PM on March 11, 2015: contributor

    ut ACK

  12. joshrabinowitz commented at 7:47 PM on March 11, 2015: contributor

    I just tested this on Centos 6.6 using this script:
    https://github.com/joshrabinowitz/bitcoin-centos-installer/blob/master/bitcoind-install and it works for stop, start, status, and restart

    # service bitcoind stop
    Stopping bitcoind:                                         [  OK  ]
    # service bitcoind status
    bitcoind is stopped
    # service bitcoind start
    Starting bitcoind: Bitcoin server starting
                                                               [  OK  ]
    # service bitcoind status
    bitcoind (pid 22883) is running...
    # service bitcoind restart
    Stopping bitcoind:                                         [  OK  ]
    Starting bitcoind: Bitcoin server starting
                                                               [  OK  ]
    # ps auxwww | grep bitcoin
    USERNAME     7726  108  2.5 1297324 415728 ?      Rsl  10:10   0:08 /opt/bitcoin/bin/bitcoind --conf=/home/USERNAME/.bitcoin/bitcoin.conf
    
  13. laanwj merged this on Mar 16, 2015
  14. laanwj closed this on Mar 16, 2015

  15. laanwj referenced this in commit f238add26a on Mar 16, 2015
  16. MarcoFalke locked this on Sep 8, 2021

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:15 UTC

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