Files
emcomm-tools-os-community/scripts/install-gps.sh
T

30 lines
689 B
Bash
Raw Normal View History

#!/bin/bash
#
# Author : Gaston Gonzalez
# Date : 1 October 2022
2024-10-06 17:28:01 -07:00
# Updated : 6 October 2024
2024-10-04 08:04:22 -07:00
# Purpose : Configure GPS and time synch
et-log "Installing GPS packages and dependencies..."
2024-10-04 08:04:22 -07:00
apt install \
gpsd \
gpsd-clients \
gpsd-tools \
chrony \
at \
-y
et-log "Installing gpsd config..."
cp ../overlay/etc/default/gpsd /etc/default/
et-log "Updating gpsd systemd script..."
cp ../overlay/lib/systemd/system/gpsd.service /lib/systemd/system/
systemctl daemon-reload
2024-10-04 08:04:22 -07:00
2024-10-06 06:52:57 -07:00
et-log "Disable automatic start of gpsd..."
systemctl disable gpsd
2024-10-04 08:04:22 -07:00
et-log "Updating chronyd to support GPS as a time source..."
2024-10-06 17:28:01 -07:00
cp ../overlay/etc/chrony/chrony.conf /etc/chrony/
2024-10-04 08:04:22 -07:00
systemctl restart chronyd