#!/bin/sh # # json dbus bridge # # Copyright (c) 2010 by Michael Olbrich # # To the extent possible under law, Pengutronix e.K. has waived all copyright # and related or neighboring rights to JSON-DBus-Bridge Demo Code. # if [ ! -f "@abs_builddir@/web-gui/index.html" ]; then echo echo 'You must run "make" before running this script' echo exit 1 fi finish() { kill $hello_pid kill $calculator_pid kill $systeminfo_pid kill $lighttpd_pid exit } trap finish SIGINT "@abs_srcdir@/services/python/hello-world.py" & hello_pid=$! "@abs_srcdir@/services/python/calculator.py" & calculator_pid=$! "@abs_builddir@/services/qt4/dbus-info-service/dbus-info-service" & systeminfo_pid=$! @LIGHTTPD@ -f "@abs_builddir@/lighttpd/lighttpd.conf" -D & lighttpd_pid=$! echo -n "waiting for lighttpd " for i in `seq 10`; do sleep 1 echo -n "." wget -e no_proxy=localhost -O - -q http://localhost:8080/ > /dev/null && break done if [ $? -ne 0 ]; then echo echo echo starting lighttpd failed! finish exit 1 else echo echo echo lighttpd sucessfully started. echo echo The demo page can be view at http://localhost:8080/ fi while [ 1 ]; do sleep 100 done