From 6010d791fea3b3a8b1895af687247e339e238396 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 21 Jul 2026 21:54:53 -0400 Subject: [PATCH] add gpredict script --- groundstation/gpredict.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 groundstation/gpredict.sh diff --git a/groundstation/gpredict.sh b/groundstation/gpredict.sh new file mode 100755 index 00000000..6f926dc8 --- /dev/null +++ b/groundstation/gpredict.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# + +if [ ! $(systemctl get-default | grep graphical) ]; then + + echo "Graphical User Interface not running!" + echo + echo "Do you want to reboot and switch to GUI so you can run Gpredict?" + read answer + + if [ "$answer" = "y" ] || [ "$answer" = "yes" ]; then + echo "Rebooting!" + sudo raspi-config nonint do_boot_behaviour B4 + sudo reboot now + else + echo "You can run Gpredict next time you run the GUI." + exit + fi +fi + +nohup /usr/bin/gpredict /dev/null 2>&1 &