Started dir with little test programs
[gregoa/zavai.git] / hooks / gps
index 6eecd99f59664fde77f29c2cb62ea9691a5c9357..3d99390e5fffcf5ffa8275c21f3bbb7071f375f4 100755 (executable)
--- a/hooks/gps
+++ b/hooks/gps
@@ -4,12 +4,7 @@ case "$1" in
        status)
                if [ `om gps power` = 1 ]
                then
        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
                else
                        echo off
                fi
@@ -20,15 +15,12 @@ case "$1" in
                if [ $old = 0 ]
                then
                        om gps keep-on-in-suspend 1
                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)
                fi
        ;;
        # When stopping the gps
        stop)
-               /etc/init.d/gpsd stop
                om gps power 0
                om gps power 0
+               om gps keep-on-in-suspend 0
        ;;
        *)
                echo "Usage: $0 {start|stop|status}." >&2
        ;;
        *)
                echo "Usage: $0 {start|stop|status}." >&2