back-end ustreamer, GPS, timelapse, and photo-refresh site working
This commit is contained in:
15
templates/gps_service.sh.j2
Normal file
15
templates/gps_service.sh.j2
Normal file
@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
i=1
|
||||
while [ $i ]
|
||||
do
|
||||
GPS_DATA=$(gpspipe -w -n 5)
|
||||
LON=$(echo $GPS_DATA | jq .lon | grep -v null | tail -n 1)
|
||||
LAT=$(echo $GPS_DATA | jq .lat | grep -v null | tail -n 1)
|
||||
SPEED=$(echo $GPS_DATA | jq .speed | grep -v null | tail -n 1)
|
||||
echo lat:$LAT > {{ gps_service_directory }}/gps_data
|
||||
echo lon:$LON >> {{ gps_service_directory }}/gps_data
|
||||
echo speed:$SPEED >> {{ gps_service_directory }}/gps_data
|
||||
chmod 755 {{ gps_service_directory }}/gps_data
|
||||
sleep 1
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user