Update config add -u for change gpsd state

pi-sensors-auto-gps
Alan Johnston 2 days ago committed by GitHub
parent 0a46f27f1e
commit dcd09063da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1772,6 +1772,41 @@ elif [ "$1" = "-U" ]; then
reboot=1
fi
elif [ "$1" = "-u" ]; then
echo
echo "Change gpsd state"
echo
FILE=/home/pi/CubeSatSim/command_control
if [[ $(sudo systemctl is-active gpsd.socket | grep inactive) ]]; then
echo "gpsd is inactive"
echo
echo "Do you want to turn gpsd to ON (y/n) "
read reset
echo
if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then
echo "gpsd set to ON"
sudo systemctl disable gpsd.socket
reboot=1
fi
else
echo "gpsd is active"
echo
echo "Do you want to turn gpsd to OFF (y/n) "
read reset
echo
if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then
echo "gpsd set to OFF"
sudo systemctl enable gpsd.socket
reboot=1
fi
fi
elif [ "$1" = "-h" ]; then
echo "config OPTION"

Loading…
Cancel
Save

Powered by TurnKey Linux.