Fix GPS modem selection and add a GPS-only time source

This commit is contained in:
Luxferre committed 2026-11-10 13:18:14 +02:00
1 parent eaf08abcd4
commit a50c01b416
18 files changed
+682 -16

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
#!/bin/sh
# Config -> Sync GPS time: set the system clock from GNSS only and report it.
# Runs as the X session user; the GPS helper escalates the clock step itself.
set -u
HELPER="${BANANARCHY_GPS_TIME_HELPER:-/usr/bin/bananarchy-gps-time-sync.sh}"
result="$("$HELPER" sync 2>&1)"
[ -n "$result" ] || result="No response from the GPS time helper"
case "$result" in
"GPS time synced"*) urgency=normal ;;
*) urgency=critical ;;
esac
if command -v notify-send >/dev/null 2>&1; then
notify-send --urgency="$urgency" --expire-time=8000 \
"Sync GPS time" "$result" >/dev/null 2>&1 || true
else
sxmo_notify_user.sh "Sync GPS time: $result" >/dev/null 2>&1 || true
fi
exit 0