systemd
Create a Unit for hydradx service:
1
nano /etc/systemd/system/hydradx.service
Copied!
Paste this (check node path, user and node name):
1
[Unit]
2
Description=HydraDX
3
4
[Service]
5
User=root
6
ExecStart=/root/HydraDX-node/target/release/hydra-dx --chain lerna --name "NODE_NAME #NodeBook"
7
Restart=always
8
RestartSec=100
9
10
[Install]
11
WantedBy=multi-user.target
Copied!
I will really appreciate it if you include the #NodeBook hashtag in the node name :)
Save it (Control+X, Y, Enter)
Enable and start service:
1
systemctl enable hydradx
2
systemctl start hydradx
Copied!
Check status:
1
systemctl -l status hydradx -n100
Copied!
If it's running smooth you will see result like this:
1
hydradx.service - HydraDX
2
Loaded: loaded (/etc/systemd/system/hydradx.service; enabled; vendor preset: enabled)
3
Active: active (running)
Copied!
If you want to change unit you should reload daemon after this:
1
systemctl daemon-reload
Copied!
Stop service:
1
systemctl stop hydradx
Copied!
Restart service:
1
systemctl restart hydradx
Copied!
Last modified 10mo ago
Copy link