systemd
Create a Unit for hydradx service:
nano /etc/systemd/system/hydradx.servicePaste this (check node path, user and node name):
[Unit]
Description=HydraDX
[Service]
User=root
ExecStart=/root/HydraDX-node/target/release/hydra-dx --chain lerna --name "NODE_NAME #NodeBook"
Restart=always
RestartSec=100
[Install]
WantedBy=multi-user.targetI will really appreciate it if you include the #NodeBook hashtag in the node name :)
Save it (Control+X, Y, Enter)
Enable and start service:
systemctl enable hydradx
systemctl start hydradxCheck status:
systemctl -l status hydradx -n100If it's running smooth you will see result like this:
hydradx.service - HydraDX
Loaded: loaded (/etc/systemd/system/hydradx.service; enabled; vendor preset: enabled)
Active: active (running)If you want to change unit you should reload daemon after this:
systemctl daemon-reloadStop service:
systemctl stop hydradxRestart service:
systemctl restart hydradxLast updated
Was this helpful?