matrix-gui-e: added chvt to init scripts
[openembedded.git] / recipes / ti / matrix-gui-e / init
blob266fdcae8230bebea7a8c961e9760239a0604356
1 #! /bin/sh
3 matrixgui="/usr/bin/matrix_guiE"
4 GUI_OPTS="-qws -display transformed:Rot90 /usr/share/matrix/html/menu_main.html"
6 test -x "$matrixgui" || exit 0
8 export TSLIB_TSDEVICE=/dev/input/touchscreen0
9 export QWS_MOUSE_PROTO=Tslib:/dev/input/touchscreen0
11 case "$1" in
12 start)
14 chvt 4
16 if [ ! -f /etc/pointercal ] ; then
17 echo -n "Calibrating touchscreen (first time only)"
18 ts_calibrate
19 echo "."
21 echo -n "Starting Matrix GUI application"
22 start-stop-daemon --start --quiet --background --pidfile /var/run/matrix-gui-e.pid --exec $matrixgui -- $GUI_OPTS
23 echo "."
25 stop)
26 echo -n "Stopping Matrix GUI application"
27 start-stop-daemon --stop --quiet --pidfile /var/run/matrix-gui-e.pid
28 echo "."
31 echo "Usage: /etc/init.d/matrix-gui-e {start|stop}"
32 exit 1
33 esac
35 exit 0