...
Apache configuration
Configure the apache server on alpha to accept and redirect viniswap petitions:
Domain http://viniswap.costaflores.com
...
ErrorLog logs/viniswap.costaflores.com.error.log
</VirtualHost>
App Installation on echo
Install NVM to upgrade NODE to an exact version
...
[root@echo viniswapMTB19]# yarn install
Automate the viniswap app boot on echo
Once the node has already synchronised we can set up a systemctl service that runs on boot creating a ethereum-node.service file in /etc/systemd/system/ with this content:
vi /etc/systemd/system/viniswap-mtb18.service
ethereum-node.service
[Unit]
Description=Costaflores Global Vineyard Node
Wants=network-online.target
After=network.target
[Service]
Type=forking
ExecStart=/home/pi/node/run.sh
ExecStop=/usr/bin/killall -9 geth
[Install]
WantedBy=multi-user.target
Finally now we just have to reload the daemon list and to test and enable it to run on boot using this commands:
pi$ sudo systemctl daemon-reload
pi$ sudo systemctl start ethereum-node
pi$ sudo systemctl enable ethereum-node