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 &