Author: heer Date: Fri Oct 9 15:49:56 2009 New Revision: 1082 Log: Extended demo update trigger script to be more flexible and to complain if curl is missing. Modified: trunk/tools/trigger-demo-update.sh Modified: trunk/tools/trigger-demo-update.sh ============================================================================== --- trunk/tools/trigger-demo-update.sh Fri Oct 9 15:47:50 2009 (r1081) +++ trunk/tools/trigger-demo-update.sh Fri Oct 9 15:49:56 2009 (r1082) @@ -1,17 +1,30 @@ #!/bin/sh -# This scrip was written for the demo in Oct/Nov 2009 +# This script was written for the demo in Oct/Nov 2009 # It is supposed to be used in combination with pisabeacon +HIPCONF=/home/mobac/hipconf +GEO_URL=http://mobile-access-demo:8080/setPos/ +WIFI_IF=eth2 + +# check for curl +if which curl >/dev/null; then + echo "GOOD: curl found" +else + echo "ERROR: curl NOT found! Install curl: apt-get install curl" + exit +fi + + echo "Fast switches are not supported. Wait at least 10 s before switching back" update_geo_id (){ -curl --fail --connect-timeout 20 http://mobile-access-demo:8080/setPos/$1 > /dev/null 2>&1 & +curl --fail --connect-timeout 20 $GEO_URL$1 > /dev/null 2>&1 & } update_hip () { -/home/mobac/hipconf manual-update eth2 +$HIPCONF manual-update $WIFI_IF } date