vim /etc/systemd/system/node.service #內容以下 [Unit] Description=ethereum-go Monitor Daemon After=network.target [Service] Type=simple User=root WorkingDirectory=/monitors/XXX ExecStart=/bin/sh -c '/usr/bin/geth -fast -rpc -rpccorsdomain * -rpcaddr 0.0.0.0 2>> /var/log/XXX.log' Restart=always [Install] WantedBy=multi-user.target
ExecStart 填寫要執行的命令html
systemctl daemon-reload
systemctl start node systemctl stop node
systemctl enable node systemctl disable node
編寫語法參考node