Systemd Service for BitCore Daemon

IMPORTANT: This guide only works if you have followed the Masternode Quick Guide. Personal configurations are not considered in this guide.

Stop your BitCore Daemon

bitcore-cli stop

Install Nano for creating/editing files (or use vi)

apt install nano

Create Systemd Service File

nano /etc/systemd/system/bitcored.service

and insert this text:

[Unit] Description=BitCore Masternode Service After=network.target

[Service] User=root Group=root

Type=forking

ExecStart=/usr/local/bin/bitcored -daemon -shrinkdebugfile ExecStop=/usr/local/bin/bitcore-cli stop

Restart=always PrivateTmp=true TimeoutStopSec=60s TimeoutStartSec=10s StartLimitInterval=120s StartLimitBurst=5

[Install] WantedBy=multi-user.target

Close the Editor and save the File with STRG + X Enable and start the Service (service starts automatically after reboot or Daemon crash)

sudo systemctl daemon-reload sudo systemctl enable bitcored sudo systemctl start bitcored

Check the Service

systemctl status bitcored | grep -i "Active" -B 1

and you should see (example): Loaded: loaded (/etc/systemd/system/bitcored.service; enabled; vendor preset: enabled) Active: active (running) since Sat 2020-05-02 14:27:09 UTC; 5h 6min ago

Credits: Thanks https://t.me/Rammbock1 for his contribution!

Last updated