-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create systemd setup for backend #138
Create systemd setup for backend #138
Conversation
This file contains the necessary steps to create a simple system service file.
Update with markdown format
I have make some changes to the service. It's better to create it /etc/systemd/system and let /usr/lib/systemd/system for programs installed from repositories or .deb Modified [unit] part, only bitcoind is necessary to be running but we want network too. Modified [service] part. --datadir is not needed, if we add user and group the datadir will be the default folder /home/<USER>/.teos/ Deleted StandardOutput=journal and StandardError=journal and SyslogIdentifier, we have enough info without it. I think it's not necessary. If the type is "simple" pidfile is not necessary Added timeout and restartsec, I've put 60 seconds in restartsec because bitcoind needs some time to fully start. Added some Hardening measures.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @decentralizedb, thanks for taking care of this.
I think this should be part of INSTALL.md instead of its own file.
It'll also be nice for this PR to have a minimal description.
Update systemd.md Unnecessary parameters have been cleaned.
Instructions to create a system service to start teosd on the background are described in a new section
Delete this file because instructions were added to install.md file
Is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some nits.
As a general comment, I don't think the text needs to be bolded for all paragraphs (####).
Also, this is missing journal logging.
Agreed, if this depends on another service it would be nice to have a link to it from a well know guide (such as raspibolt) |
Update the install file to make the steps for creating the necessary system services more precise and cleaner.
I added the link to a guide that is quite detailed and updated instructions. |
I attended all indications, I hope this time it will be ok, but if not, please let me know. I'm happy to help and learn! xD |
Tagging @openoms here since he's way more knowledgeable than me |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this makes sense, but I'd structure it differently. I think we can follow the same structure followed by Bitcoin Core for their init files (check https://github.com/bitcoin/bitcoin/blob/master/contrib/init and https://github.com/bitcoin/bitcoin/blob/master/contrib/init/bitcoind.service), that is:
- Create a new folder in the project root called
contrib
- Create a subfolder called
init
- Create a
README.md
with most of the content added to this file in the PR - Create a
teosd.service
file including the relevant service information
- Create a subfolder called
- Link the
contrib/init/README.md
file toINSTALL.md
under theSystemd setup for backend
This may look like:
[...]
Please refer to the cargo documentation for more detailed instructions.
# Systemd setup for backend
Refer to init(LINK) for a detailed explanation of how to set up your systemd service or something on these lines.
If anyone wants to create a system service to run teos as a system service to start on the background, the instructions to create it are described in a new section in the install.md file.