-
-
Save osnwt/7fc8702f6e9c6f455b87bb47da9c0ca7 to your computer and use it in GitHub Desktop.
systemd config file to handle a coin daemon
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Create and edit this file here: | |
# /etc/systemd/system/cerberus.service | |
# | |
# Edit: | |
# - Description (service name) | |
# - User/Group (always use unprivileged user/group to run coin daemons) | |
# - Working directory (can be any, daemon uses hard-coded path if not given) | |
# - ExecStart/ExecStop (daemon and cli executables) | |
# | |
# After installing run the following as root or using sudo: | |
# sudo systemctl daemon-reload # do it once to update systemd conf | |
# suso systemctl start cerberus.service # to start daemon | |
# suso systemctl stop cerberus.service # to stop daemon | |
# suso systemctl status cerberus.service # to check daemon status | |
# | |
# More info to learn systemd: | |
# https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-systemd-services-and-units | |
# | |
[Unit] | |
Description=Cerberus service | |
After=network.target | |
[Service] | |
Type=forking | |
User=cbs | |
Group=cbs | |
WorkingDirectory=/home/cbs | |
ExecStart=/usr/local/bin/cerberusd -daemon | |
ExecStop=/usr/local/bin/cerberus-cli stop | |
Restart=always | |
PrivateTmp=true | |
TimeoutStopSec=60s | |
TimeoutStartSec=10s | |
StartLimitInterval=120s | |
StartLimitBurst=5 | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment