$ python3 -m historybuilder
Create the file /etc/systemd/system/historybuilder.service
[Unit]
Description=Queries DFINITY API and writes to master.db
After=network.target
[Service]
WorkingDirectory=<path_to_this_repo>
ExecStart=python3 -m historybuilder
Restart=always
RestartSec=5
Type=simple
Start Service
# reload the service if changes have been made
$ sudo systemctl daemon-reload
# start the service
$ sudo systemctl start historybuilder
# get the status of the service
$ sudo systemctl status historybuilder
# stop the service
$ sudo systemctl stop historybuilder
Viewing The logs
# you can view the raw output, which gets written here:
$ tail /var/log/syslog
# or you can use journalctl (-f for real time)
$ journalctl -u historybuilder -f