status)
if [ `om gps power` = 1 ]
then
- if [ `pgrep -c gpsd` != 0 ]
- then
- echo on
- else
- echo off
- fi
+ echo on
else
echo off
fi
if [ $old = 0 ]
then
om gps keep-on-in-suspend 1
- /etc/init.d/gpsd stop
- # TODO: configure to UBX mode
- /etc/init.d/gpsd start
fi
;;
# When stopping the gps
stop)
- /etc/init.d/gpsd stop
om gps power 0
+ om gps keep-on-in-suspend 0
;;
*)
echo "Usage: $0 {start|stop|status}." >&2