meta-freescale-distro/recipes-qt/qt-in-use/files/smarthome
Mario Domenech Goulart ec1b69714e qt-in-industrial-embedded-common: add init script for the smarthome demo
Currently, qt-in-industrial-embedded starts no demo automatically when
installed.  This patch adds an init script so that the smarthome demo
can be automatically started on boot.

Signed-off-by: Mario Domenech Goulart <mario@ossystems.com.br>
2014-01-23 23:04:14 -02:00

673 B

#!/bin/sh

set -e

SMARTHOME="smarthome" SMARTHOME_ARGS="[ -x '__BINDIR__/X' ] && echo '' || echo '-qws'"

case "$1" in start) echo "Starting $SMARTHOME" if [ -f SYSCONFDIR/profile.d/tslib.sh ]; then . SYSCONFDIR/profile.d/tslib.sh fi if [ -e "$TSLIB_TSDEVICE" ]; then if [ ! -f SYSCONFDIR/pointercal ]; then BINDIR/ts_calibrate fi QWS_MOUSE_PROTO=tslib:$TSLIB_TSDEVICE $SMARTHOME $SMARTHOME_ARGS & else $SMARTHOME $SMARTHOME_ARGS & fi ;; stop) echo "Stopping $SMARTHOME" killall $SMARTHOME ;; restart) $0 stop $0 start ;; *) echo "usage: $0 { start | stop | restart }" >&2 exit 1 ;; esac

exit 0