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

Commit

Permalink
fixed bug where timesync wouldn't happen
Browse files Browse the repository at this point in the history
  • Loading branch information
jonashoechst committed Feb 22, 2022
1 parent 29f87f7 commit c95c437
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 14 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ RadioTracking/boot/mosquitto.d/*.crt

docs/.sass-cache
docs/_site
boot/wireguard.conf
4 changes: 2 additions & 2 deletions boot/radiotracking.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ config = '/boot/radiotracking.ini'
schedule = []

[rtl-sdr]
device = ['0', '1', '2', '3']
calibration = [0.0, 0.0, 0.0, 0.0]
device = ['0']
calibration = [0.0]
center_freq = 150150000
sample_rate = 300000
sdr_callback_length = None
Expand Down
11 changes: 11 additions & 0 deletions etc/systemd/system/chrony-waitsync.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Unit]
Description=Wait until chrony timesync and notify systemd.
After=chrony.service

[Service]
ExecStart=/bin/bash -c 'chronyc waitsync && (mkdir -p /run/systemd/timesync/; touch /run/systemd/timesync/synchronized)'
Type=oneshot
StandardOutput=journal

[Install]
RequiredBy=multi-user.target
11 changes: 0 additions & 11 deletions etc/systemd/system/hwclock.service

This file was deleted.

3 changes: 2 additions & 1 deletion tRackIT.Pifile
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ RUN git config --global user.email "pi@tRackIT"
RUN git config --global user.name "tRackIT User"

# enable hostname-config script and set default hostname
RUN bash -c 'CMDLINE=$(cat /boot/cmdline.txt); echo "${CMDLINE} -- systemd.hostname=tRackIT" > /boot/cmdline.txt'
RUN bash -c 'CMDLINE=$(cat /boot/cmdline.txt); echo "${CMDLINE} -- systemd.hostname=umr-test-00001" > /boot/cmdline.txt'
RUN systemctl enable hostname-config.service

# Enabling wait for time-sync.target (depending services will not start before the clock is synced)
Expand Down Expand Up @@ -134,6 +134,7 @@ RUN tee -a /etc/sysdweb.conf <<EOF
title = Chrony Time Synchronization
unit = chrony
EOF
RUN systemctl enable chrony-waitsync

# Install and enable pymqttutil
RUN python3 -m pip install -e /home/pi/pymqttutil
Expand Down

0 comments on commit c95c437

Please sign in to comment.