Hi, glad to help
yes, you can create a systemd service like this: /etc/systemd/system/quarkMN1.service:
[Unit]
Description=quarkcoin MN1 service
After=network.target
[Service]
User=root
Group=root
Type=forking
#PIDFile=/root/.quarkcoin/quarkd.pid
ExecStart=/root/bin/quarkd_MN1.sh
ExecStop=/root/bin/quark-cli_MN1.sh stop
Restart=always
PrivateTmp=true
TimeoutStopSec=60s
TimeoutStartSec=10s
StartLimitInterval=120s
StartLimitBurst=5
[Install]
WantedBy=multi-user.target
Then /root/bin/quarkd_MN1.sh:
#!/bin/bash
quarkd -daemon -conf=/root/.quarkcoin_MN1/quarkcoin.conf -datadir=/root/.quarkcoin_MN1 $*
quark-cli_MN1.sh:
#!/bin/bash
quark-cli -conf=/root/.quarkcoin_MN1/quarkcoin.conf -datadir=/root/.quarkcoin_MN1 $*
start service:
systemctl start quarkMN1
and set in crontab: crontab -e
@reboot systemctl start quarkMN1
and if you don't want to corrupt database when restart, create a link to: /etc/rc6.d
@K99_stop_nodes (without extension), from /root/bin/stop_nodes.sh:
contain stop masternode command: systemctl stop quarkMN1
and you are really ready with your masternode!