BAPP=4.0 ID=GPS Name=gps Comment='GPS Software' Ver=REPO localVer=REPO INSTALL(){ cd ${BUILDDIR} || return sudo apt install -y python3-gps gpsd-tools gpsd-clients gpsd chrony python3-gi-cairo libgps-dev sudo mv /etc/default/gpsd /etc/default/gpsd.org sudo wget https://raw.githubusercontent.com/km4ack/pi-scripts/master/gpsd -P /etc/default/ CHRONYCHK=$(grep "refclock SHM 0 offset 0.5 delay 0.2 refid NMEA" /etc/chrony/chrony.conf) if [ -z "$CHRONYCHK" ]; then echo "refclock SHM 0 offset 0.5 delay 0.2 refid NMEA" | sudo tee -a /etc/chrony/chrony.conf fi #line below added per this issue - https://github.com/km4ack/pi-build/issues/146 24SEPT2020 sudo ln -s /lib/systemd/system/gpsd.service /etc/systemd/system/multi-user.target.wants/ GPS=$(grep "GPS=" ${BAPDIR}/cache/config.txt | sed 's/GPS=//') sudo sed -i "s|^DEVICES.*|DEVICES=\"${GPS}\"|" /etc/default/gpsd } MENU(){ cat >xgps.desktop </dev/null; then CURRENT=0 NEWVER=REPO else CURRENT=REPO NEWVER=REPO fi } REMOVE(){ sudo apt purge -y python3-gps gpsd-tools gpsd-clients gpsd chrony python3-gi-cairo libgps-dev }