From 23649907430c006721814b2144f99957d9330534 Mon Sep 17 00:00:00 2001 From: "Jason D. McCormick" Date: Sun, 28 Apr 2019 21:53:41 -0400 Subject: initial add --- README.md | 35 +++++++++++++++++++++++++++++++++++ bmcli | 10 ++++++++++ bmcli-wrapper | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 80 insertions(+) create mode 100644 README.md create mode 100755 bmcli create mode 100755 bmcli-wrapper diff --git a/README.md b/README.md new file mode 100644 index 0000000..5a6a8c4 --- /dev/null +++ b/README.md @@ -0,0 +1,35 @@ +# pistar-Scripts +A collection of scripts to manage various aspects of the Pi-Star system +from the command line. + +IMPORTANT: These scripts are NOT supported by Pi-Star. Do not request support +for them on the Pi-Star forums or the Pi-Star Facebook group. + +# System Requirements +- Pi-Star 3.4.n + +# Installation +Copy the contents of the repository somewhere useful. All scripts are +hardcoded to be called from the same directory where they reside. +This will be changed in the future to make them more portable. + +# Scripts +The following scripts are in this package. + +## bmcli +bmcli (and its associated bmcli-wapper) are command-line interfaces +to the DMR Brandmeister API. Uses all configuration from Pi-Star and +requires the Brandmeister API to configured in the web interface +before using. + +``` +usage: + bmcli-wrapper.php add TALKGROUP TIMESLOT + bmcli-wrapper.php del TALKGROUP TIMESLOT + bmcli-wrapper.php dropdyn + +``` + +This script has only rudimentary error checking so make sure you +call it correctly or you could have some interesting BM configurations +pointing to your repeater/hotspot. diff --git a/bmcli b/bmcli new file mode 100755 index 0000000..6bac9cb --- /dev/null +++ b/bmcli @@ -0,0 +1,10 @@ +#!/bin/bash + +if [ $# -lt 1 ]; then + ./bmcli-wrapper + exit 1 +else + ./bmcli-wrapper $* 2>&1 | \ + grep '' | \ + sed 's/<...?>//g' +fi diff --git a/bmcli-wrapper b/bmcli-wrapper new file mode 100755 index 0000000..bff5031 --- /dev/null +++ b/bmcli-wrapper @@ -0,0 +1,35 @@ +#!/usr/bin/php + -- cgit v1.2.3