X-Git-Url: https://git.toastfreeware.priv.at/gregoa/zavai.git/blobdiff_plain/e709f436af83c88fb64a1968150e732b463d6746..c1a866bff32fe03cc1af7be38e6108148f3adcc5:/hooks/gps diff --git a/hooks/gps b/hooks/gps index 4102487..3d99390 100755 --- a/hooks/gps +++ b/hooks/gps @@ -4,12 +4,7 @@ case "$1" in 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 @@ -19,16 +14,13 @@ case "$1" in old=`om gps --swap power 1` if [ $old = 0 ] then - om gpt keep_on_during_suspend 1 - /etc/init.d/gpsd stop - # TODO: configure to UBX mode - /etc/init.d/gpsd start + om gps keep-on-in-suspend 1 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