You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
product-iots/modules/samples/firealarm/Agent/sketch/startservice.sh

25 lines
845 B

#!/bin/bash
echo "----------------------------------------------------------------"
echo "| WSO2 IOT Sample "
echo "| RaspiAlarm "
echo "| ---------------- "
echo "| ....initializing startup-script "
echo "----------------------------------------------------------------"
while true; do
read -p "Whats the time-interval (in seconds) between successive Data-Pushes to the WSO2-IoT-Server (ex: '60' indicates 1 minute) > " interval
if [ $interval -eq $interval 2>/dev/null ]
then
echo "Setting data-push interval to " $interval " seconds."
sed s/^push-interval=.*/push-interval=$interval/ deviceConfig.properties > myTmp
mv -f myTmp deviceConfig.properties
break;
else
echo "Input needs to be an integer indicating the number seconds between successive data-pushes."
fi
done
sudo java -jar wso2-firealarm-real-agent.jar