2015-12-06 17:27:28 -05:00
|
|
|
#! /bin/sh
|
|
|
|
|
2015-12-23 15:21:33 -05:00
|
|
|
###################################################
|
|
|
|
# #
|
|
|
|
# Download Subscriber and Peer ID's from DMR-MARC #
|
|
|
|
# #
|
|
|
|
###################################################
|
2015-12-06 17:27:28 -05:00
|
|
|
|
2015-11-27 08:02:30 -05:00
|
|
|
# To provide more readable output from DMRlink with current subscriber and repeater IDs, we download the CSV files from DMR-MARC
|
|
|
|
# If you are going to use this in a cron task, don't run it more then once a day.
|
|
|
|
# It might be good to find alternale a source as a backup.
|
|
|
|
|
|
|
|
# <http://www.dmr-marc.net/cgi-bin/trbo-database/datadump.cgi>
|
|
|
|
|
|
|
|
# wget -O users.csv -q "http://www.dmr-marc.net/cgi-bin/trbo-database/datadump.cgi?table=users&format=csv&header=0"
|
|
|
|
|
|
|
|
# Options are:
|
|
|
|
|
|
|
|
# table { users | repeaters }
|
|
|
|
|
|
|
|
# format { table | csv | csvq | json }
|
|
|
|
|
|
|
|
# header { 0 | 1 } (only applies to table and csv formats)
|
|
|
|
|
|
|
|
# id { nnnnnn } (query an individual record)
|
|
|
|
|
|
|
|
# Get the user IDs.
|
2015-12-06 16:57:24 -05:00
|
|
|
wget -O subscriber_ids.csv -q "http://www.dmr-marc.net/cgi-bin/trbo-database/datadump.cgi?table=users&format=csv&header=0"
|
2015-11-27 08:02:30 -05:00
|
|
|
|
|
|
|
# Get the peer IDs
|
2015-12-06 16:57:24 -05:00
|
|
|
wget -O peer_ids.csv -q "http://www.dmr-marc.net/cgi-bin/trbo-database/datadump.cgi?table=repeaters&format=csv&header=0"
|
2015-11-27 08:02:30 -05:00
|
|
|
|
2015-12-23 15:21:33 -05:00
|
|
|
# Tell ambe_audio to re-read the files
|
|
|
|
echo -n "reread_subscribers" | nc 127.0.0.1 1235
|
|
|
|
|