Contribution init script for debian/ubuntu operating systems to cleanly automatically start and stop bitcoind.
Init script for debian/ubuntu #20525
pull adam083b wants to merge 1 commits into bitcoin:master from adam083b:patch-2 changing 1 files +67 −0-
adam083b commented at 10:55 PM on November 28, 2020: none
-
Init script for debian/ubuntu dc6bb9ec45
- DrahtBot added the label Scripts and tools on Nov 28, 2020
-
luke-jr commented at 6:09 PM on November 30, 2020: member
Last I checked, Debian/Ubuntu use systemd, for which we already have a service file...?
-
adam083b commented at 6:53 PM on November 30, 2020: none
Yes indeed there is already a script for systemd but this script is intended to be used on RedHat operating systems and is not compatible with Debian/Ubuntu that's why I created this new one.
-
hebasto commented at 7:52 AM on December 2, 2020: member
Contribution init script for debian/ubuntu operating systems to cleanly automatically start and stop bitcoind.
Yes indeed there is already a script for systemd but this script is intended to be used on RedHat operating systems and is not compatible with Debian/Ubuntu that's why I created this new one.
Why "debian/ubuntu" is mentioned in the PR title and in OP?
-
adam083b commented at 1:39 PM on December 2, 2020: none
Contribution init script for debian/ubuntu operating systems to cleanly automatically start and stop bitcoind.
Yes indeed there is already a script for systemd but this script is intended to be used on RedHat operating systems and is not compatible with Debian/Ubuntu that's why I created this new one.
Why "debian/ubuntu" is mentioned in the PR title and in OP?
What OP means please?
If you are referring to the filename it's because there is already a script named bitcoind.init for RedHat operating systems so I thought it would the most appropriate name to differentiate the scripts, but if you want to give another name to this file it's fine for me. Also it's in the pull request description because it's the best description in my opinion except if you have a more generic name to reference debian/ubuntu operating systems i'd be happy to change that too.
Also keep in mind that I made this script for my personal needs and just wanted to share it, if you are not comfortable with the idea of merging it in the project it's fine for me.
Thanks
-
luke-jr commented at 4:04 PM on December 2, 2020: member
contrib/init/bitcoind.service should work fine on debian/ubuntu...
-
hebasto commented at 5:17 PM on December 2, 2020: member
What OP means please?
"original post", i.e. pull request description.
-
hebasto commented at 5:24 PM on December 2, 2020: member
Yes indeed there is already a script for systemd but this script is intended to be used on RedHat operating systems and is not compatible with Debian/Ubuntu that's why I created this new one.
It seems I mis-read your message. You mean that the current
bitcoind.servicein the repo is intended to be used on RedHat operating systems, right? I didn't run it on RedHat, but on Ubuntu it works just fine for me. What errors do you encounter? -
laanwj commented at 1:59 PM on December 3, 2020: member
Thanks for your contribution. However the systemd service file should work on Ubuntu. If it does not at this time for you, it would be good to fix that.
I don't think including an old sysv-style init script is the right solution. Systemd contains some fallbacks to support this but that's at most a temporary situation, I suspect.
-
adam083b commented at 7:56 PM on December 4, 2020: none
Thanks for your contribution. However the systemd service file should work on Ubuntu. If it does not at this time for you, it would be good to fix that.
I don't think including an old sysv-style init script is the right solution. Systemd contains some fallbacks to support this but that's at most a temporary situation, I suspect.
You can't adapt the existing script to work on any operating system using Systemd, for example the script bitcoind.init uses the file /etc/init.d/functions to get generic initialization functions which is specific to Redhat and doesn't exist on Debian/Ubuntu. Depending on the operating system you want to support you can replace the existing script by mine, or reject my merge request.
-
hebasto commented at 8:24 PM on December 4, 2020: member
You can't adapt the existing script to work on any operating system using Systemd, for example the script bitcoind.init uses the file /etc/init.d/functions to get generic initialization functions which is specific to Redhat and doesn't exist on Debian/Ubuntu. Depending on the operating system you want to support you can replace the existing script by mine, or reject my merge request.
Not
bitcoind.init, butbitcoind.serviceworks withsystemdjust fine. -
laanwj commented at 4:57 PM on December 15, 2020: member
Closing this, as it seems to be based on a misunderstanding.
- laanwj closed this on Dec 15, 2020
- DrahtBot locked this on Feb 15, 2022