diff options
Diffstat (limited to 'recipes/ti/matrix-gui-e/init')
-rwxr-xr-x | recipes/ti/matrix-gui-e/init | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/recipes/ti/matrix-gui-e/init b/recipes/ti/matrix-gui-e/init new file mode 100755 index 0000000000..8a1c77e965 --- /dev/null +++ b/recipes/ti/matrix-gui-e/init @@ -0,0 +1,32 @@ +#! /bin/sh + +matrixgui="/usr/bin/matrix_guiE" +GUI_OPTS="-qws -display transformed:Rot90 /usr/share/matrix/html/menu_main.html" + +test -x "$matrixgui" || exit 0 + +export TSLIB_TSDEVICE=/dev/input/touchscreen0 +export QWS_MOUSE_PROTO=Tslib:/dev/input/touchscreen0 + +case "$1" in + start) + if [ ! -f /etc/pointercal ] ; then + echo -n "Calibrating touchscreen (first time only)" + ts_calibrate + echo "." + fi + echo -n "Starting Matrix GUI application" + start-stop-daemon --start --quiet --background --pidfile /var/run/matrix-gui-e.pid --exec $matrixgui -- $GUI_OPTS + echo "." + ;; + stop) + echo -n "Stopping Matrix GUI application" + start-stop-daemon --stop --quiet --pidfile /var/run/matrix-gui-e.pid + echo "." + ;; + *) + echo "Usage: /etc/init.d/matrix-gui-e {start|stop}" + exit 1 +esac + +exit 0 |