QtMoko navit wrapper script, clock stays on
Patryk Benderz
Patryk.Benderz at esp.pl
Mon Aug 20 08:56:31 CEST 2012
[cut]
Hi Peter,
Have you tried starting Navit as you described:
> #!/bin/sh
> /opt/qtmoko/bin/gps-poweron.sh
+/opt/qtmoko/bin/checknavitgpsoff.sh &
> /opt/qtmoko/bin/navit.bin &
...and additionally have something like this (checknavitgpsoff.sh)
running in background:
#!/bin/sh
#
# Defining variables:
logfile=/var/log/checknavitgpsoff.log
sleeptime=10
# Initial sleep, to let Navit start:
sleep ${sleeptime}
# Loop search for Navit process:
while
do
ps ax|grep -v 'grep'|grep 'navit'
if (($?==0))
then
echo `date +"%F %X"`": Navit still running..." >> ${logfile}
sleep ${sleeptime}
else
echo `date +"%F %X"`": Unable to find Navit PID. Turning off GPS." >> ${logfile}
/opt/qtmoko/bin/gps-poweroff.sh
break
# or 'exit 0' instead of break
fi
done
--
Patryk "LeadMan" Benderz
Linux Registered User #377521
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments
More information about the community
mailing list