Ticket #869: navit-wrapper

File navit-wrapper, 2.3 KB (added by me.yahoo.com/a/jya23di6w_0a00d6zazcw88xiiakhiu91aw-#78152, 9 years ago)

the modified navit-startup-script

Line 
1#!/bin/sh
2
3cd /mnt/sdcard/navit/bin
4
5# Set some paths.
6export PATH=$PATH:/mnt/sdcard/navit/bin
7export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mnt/sdcard/navit/lib:/mnt/sdcard/LoquendoTTS/lib
8export HOME=/mnt/sdcard/navit
9export NAVIT_LIBDIR=/mnt/sdcard/navit/lib/navit
10export NAVIT_SHAREDIR=/mnt/sdcard/navit/share
11export NAVIT_LOCALEDIR=/mnt/sdcard/navit/locale
12
13# tslib requirements.
14export TSLIB_CONSOLEDEVICE=none
15export TSLIB_FBDEVICE=/dev/fb
16export TSLIB_TSDEVICE=/dev/ts
17export TSLIB_CALIBFILE=/mnt/sdcard/navit/ts/pointercal
18export TSLIB_CONFFILE=/mnt/sdcard/navit/ts/ts.conf
19export TSLIB_PLUGINDIR=/mnt/sdcard/navit/lib/ts
20
21# SDL requirements.
22export SDL_MOUSEDRV=TSLIB
23export SDL_MOUSEDEV=$TSLIB_TSDEVICE
24export SDL_NOMOUSE=1
25export SDL_FBDEV=/dev/fb
26export SDL_VIDEODRIVER=fbcon
27export SDL_AUDIODRIVER=dsp
28
29# fontconfig requirements
30export FC_CONFIG_DIR=/mnt/sdcard/navit/fonts
31export FONTCONFIG_DIR=/mnt/sdcard/navit/fonts
32export FC_CONFIG_FILE=/mnt/sdcard/navit/fonts/fonts.conf
33export FONTCONFIG_FILE=/mnt/sdcard/navit/fonts/fonts.conf
34export FC_DEBUG=0
35
36# Set time zone.
37export TZ="CEDT-01:00:00CEST-02:00:00,M3.4.0,M10.4.0"
38
39# Set language.
40#export LANG=de_DE
41#export LANGUAGE=de_DE
42
43# Run Navit.
44if /mnt/sdcard/navit/sdl/testvidinfo | grep 480x272
45then
46        /mnt/sdcard/navit/bin/navit /mnt/sdcard/navit/share/config/tomtom480.xml 2>/mnt/sdcard/navit/navit.log&
47elif  /mnt/sdcard/navit/sdl/testvidinfo | grep 320x240
48then
49        /mnt/sdcard/navit/bin/navit /mnt/sdcard/navit/share/config/tomtom320.xml 2>/mnt/sdcard/navit/navit.log&
50else
51        exit 1
52fi
53
54echo "*** Before killing ttn" > /mnt/sdcard/navit/navit-wrapper.log
55ps | grep ttn >> /mnt/sdcard/navit/navit-wrapper.log
56echo "-- end ps-list --" >> /mnt/sdcard/navit/navit-wrapper.log
57
58# Kill TTN while Navit is running.
59killall ttn
60
61echo "*** After killing ttn" >> /mnt/sdcard/navit/navit-wrapper.log
62ps | grep ttn >> /mnt/sdcard/navit/navit-wrapper.log
63echo "-- end ps-list --" >> /mnt/sdcard/navit/navit-wrapper.log
64
65st=10
66echo "-- start watchdog every $st sec --" >> /mnt/sdcard/navit/navit-wrapper.log
67while [ $? -eq 0 ]
68do
69echo "\0" > /dev/watchdog
70sleep $st
71uptime >> /mnt/sdcard/navit/navit-wrapper.log
72ps | grep -v grep | grep -v wrapper | grep navit
73done
74
75echo `date ` " *** killing by watchdog ***" >> /mnt/sdcard/navit/navit-wrapper.log
76/sbin/reboot