run_thingsboard.sh
Home
/
docker /
thingsboard /
run_thingsboard.sh
#!/bin/bash
dpkg -i /root/thingsboard.deb
reachable=0
while [ $reachable -eq 0 ];
do
echo "thingsboard-db-schema container is still in progress. waiting until it completed..."
sleep 3
ping -q -c 1 thingsboard-db-schema > /dev/null 2>&1
if [ "$?" -ne 0 ];
then
echo "thingsboard-db-schema container completed!"
reachable=1
fi
done
printenv | awk -F "=" '{print "export " $1 "='\''" $2 "'\''"}' >> /usr/share/thingsboard/conf/thingsboard.conf
cat /usr/share/thingsboard/conf/thingsboard.conf
echo "Starting 'Thingsboard' service..."
service thingsboard start
sleep 10
tail -f /var/log/thingsboard/thingsboard.log