Building side research project with open ADR
python -m venv drenv
. drenv/bin/activate
pip install bacpypes3 openleadr ifaddr
# make systemd file
$ cd /etc/systemd/system
### edit file
$ sudo nano adr_client.service
[Unit]
Description=ADR Client Service
After=network.target
[Service]
User=dr
ExecStart=/home/dr/drenv/bin/python /home/dr/dr_app/app.py --name Slipstream --instance 3056672 --debug
WorkingDirectory=/home/dr/dr_app/
[Install]
WantedBy=multi-user.target
# Start linux service
$ sudo systemctl enable adr_client.service
# Start linux service
$ sudo systemctl start adr_client.service
# Check status
$ sudo systemctl status adr_client.service
# Tail logs
$ sudo journalctl -fu adr_client.service
# stop linux service
$ sudo systemctl stop adr_client.service
# Reload if app code needs to be changed
$ sudo systemctl daemon-reload
# Restart linux service
$ sudo systemctl restart adr_client.service