Created
February 24, 2020 10:29
-
-
Save Aldiwildan77/6fbd2e854cd135c2c2fb70c964b37b15 to your computer and use it in GitHub Desktop.
Tile38 database for geospatial and geofencing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
start_time="$(date -u +%s)" | |
server=$1 | |
file=$2 | |
i=0 | |
#telnet 127.0.0.1 9851 <<EOF | |
while IFS= read -r line | |
do | |
echo "$line" | |
IFS=',' #delimiter | |
read -r var1 var2 var3 <<< "$line" # Dijadikan array | |
key=${var1// /_} | |
echo "$server/set+fleet+$key+point+$var2+$var3" | |
curl "$server/set+fleet+$key+point+$var2+$var3" | |
((i=i+1)) | |
done < "$file" | |
end_time="$(date -u +%s)" | |
elapsed="$(bc <<<"$end_time-$start_time")" | |
echo "Total of $elapsed seconds elapsed for $i process" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
docker pull tile38/tile38 | |
docker network create tile38 | |
docker run -d --net=tile38 -it --rm --name tile38 tile38/tile38 | |
echo -e "\e[32mTile38 is Running at PORT 9851\e[0m" | |
docker run --net=tile38 -it tile38-cli -h tile38 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment