Skip to content

Latest commit

 

History

History
42 lines (30 loc) · 790 Bytes

systemd.md

File metadata and controls

42 lines (30 loc) · 790 Bytes

Setting up Systemd

If you want to deploy your bbgo binary to a linux system, you could use the systemd to launch your daemon.

To do this, add service file into the directory /etc/systemd/system/bbgo.service with the following content:

[Unit]
After=network-online.target
Wants=network-online.target

[Install]
WantedBy=multi-user.target

[Service]
WorkingDirectory=/home/bbgo
# KillMode=process
ExecStart=/home/bbgo/bbgo run
User=bbgo
Restart=always
RestartSec=60

Then, to load the service file, you need to run:

systemctl daemon-reload

And then you can start your service by running enable and start:

systemctl enable bbgo.service
systemctl start bbgo.service

To stop your service, you can run:

systemctl stop bbgo.service