I have set up of private blockchain using reference https://developers.eos.io/welcome/latest/tutorials/bios-boot-sequence. My concern is to write the systemd
service for these nodes to start and stop the nodeos
after and before reboot/shutdown. I need to stop the node just before the reboot/shutdown using stop.sh
. This step is just to avoid the unclean shutdown of nodeos which requires replay. And start nodeos
using start.sh
after the server starts. I create the service in /etc/systemd/system/eos.service
:
[Unit]
Description=Start and Stop the eos blockchain
After=network.target shutdown.target reboot.target
[Service]
RemainAfterExit=true
ExecStop=/home/user/biosboot/genesis/stop.sh
ExecStart=/home/user/biosboot/genesis/start.sh
Restart=on-failure
[Install]
WantedBy=multi-user.target
This service is active but not working. Please help me with writing the service file. Or any other way to start the nodeos
using the start.sh
file after server restart/shutdown?