#!/bin/sh
# Copyright (C) 2017 Algo Communication Products Ltd.

ACTION=$1

if [ "$ACTION" = "start" ]; then
	/etc/init.d/algo-uieng stop
	# clear framebuffer
	/opt/algo/bin/bootui fillcolor all white
	/opt/algo/bin/bootui showtxt 22 "Touch the screen to start the test ..."
	start-stop-daemon --start --background --exec /opt/algo/bin/ts-raw
elif [ "$ACTION" = "stop" ]; then
	killall ts-raw
	/etc/init.d/algo-uieng start
fi
