Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # should we run APRS script?
- [ ! -s "/tmp/aprs" ] && exit
- # load nema sentence from GPS
- gpsr=$(gpspipe -n 8 -r ntpi:2947 |sed -n '/$GPGGA/{p;q}')
- #GPS Sync Check - if no GPS lock, no run
- gpss=$(printf "$gpsr" | cut -d ',' -f7)
- #test "$gpss" = "0" && exit
- gps=$(printf "$gpsr" | cut -b 19-42|sed 's#N,#N\\#g'|sed 's#,##g'|cut -b 1-7,10-19,22)
- #Define login info
- user=NQ4T
- password=2325
- #Define object user info
- senduser=NQ4T-10
- #DMR
- #tg=$(curl -s http://127.0.0.1/mmdvmhost/bm_links2.php| sed 's/<[^>]\+>//g' | sed 's/None//g' | sed ':a;N;$!ba;s/\n/ /g'|sed 's/TG/#/g')
- #comment="BrandMeister TGs: $tg"
- #DSTAR
- dstar=$(curl -s http://127.0.0.1/mmdvmhost/repeaterinfo.php | egrep "Linked|linked" | sed 's/<[^>]\+>//g' | sed 's/L/l/')
- comment="DStar $dstar"
- #parse packet
- data="$senduser>APN100,TCPIP*:=$gps> $comment"
- #Send data to the server
- printf "%s\n" "user $user pass $password" "$data"
- #| ncat rotate.aprs2.net 14580
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement