Skip to content
This repository was archived by the owner on Jul 11, 2023. It is now read-only.

Commit

Permalink
separated radiotracking from config module
Browse files Browse the repository at this point in the history
  • Loading branch information
jonashoechst committed Oct 18, 2021
1 parent 05aed0a commit f79d67e
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
4 changes: 4 additions & 0 deletions etc/caddy/Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
reverse_proxy http://localhost:8050
}

route /radiotracking-config/* {
reverse_proxy http://localhost:8051
}

file_server * browse {
root /data/
}
Expand Down
15 changes: 15 additions & 0 deletions etc/systemd/system/radiotracking-config.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[Unit]
Description=RadioTracking Configuration
After=network.target mosquitto.service time-sync.target hostname-config.service

StartLimitIntervalSec=600
StartLimitAction=reboot

[Service]
ExecStart=bash -c "/usr/bin/python3 -m radiotracking.config --config /boot/radiotracking.ini --station `hostname` --dashboard --dashboard-host localhost --dashboard-port 8050 --mqtt --mqtt-host localhost --mqtt-port 1883 --csv --export-config --path /data"
Restart=always
RestartSec=10s

[Install]
WantedBy=multi-user.target

2 changes: 1 addition & 1 deletion home/pi/pyradiotracking
6 changes: 6 additions & 0 deletions tRackIT.Pifile
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ RUN mkdir /data
RUN chown pi:pi /data
RUN ln -s . /data/sysdweb
RUN ln -s . /data/radiotracking
RUN ln -s . /data/radiotracking-config
RUN ln -s /boot/ /data/boot

# enable caddy
Expand Down Expand Up @@ -159,8 +160,13 @@ RUN tee -a /etc/modprobe.d/raspi-blacklist.conf <<<'blacklist dvb_usb_rtl28xxu'
# Install radiotracking
RUN python3 -m pip install -e /home/pi/pyradiotracking
RUN systemctl enable radiotracking.service
RUN systemctl enable radiotracking-config.service
RUN tee -a /etc/sysdweb.conf <<EOF
[radiotracking]
title = RadioTracking
unit = radiotracking

[radiotracking-config]
title = RadioTracking Configuration
unit = radiotracking-config
EOF

0 comments on commit f79d67e

Please sign in to comment.