Commit fd959740 authored by F4BWG's avatar F4BWG

v15

parent f84b4e51
==== Version 15
+ Change versionning number for future auto-update revision
+ Added ability to add Ban for audio loop remedy or prevention
+ Cosmetic changes
==== Version 1.4
+ Added bridge edit
+ Complete redesign of auto-update to avoid empty file when git server is erroring
......@@ -7,7 +12,7 @@
+ Updated README
==== Version: 1.3.0b
+ cosmetic revision
+ cosmetic changes
==== Version: 1.3.0a
+ Added self-update ability
......
15
\ No newline at end of file
#####################################################################################
# NCurses-Based Bash Menu for BM Master Sysops
# Version: 1.4
# Version: 15
#
# Questions/Comments: oli@f4bwg.com
# Latest Version can be downloaded at:
......@@ -38,7 +38,7 @@ TITLE="BM-XXXX"
#### YOU SHOULD NOT CHANGE ANYTHING BELOW ####
VSCRIPT="1.4"
VSCRIPT="15"
echo "BM Master Menu v $VSCRIPT"
if [ ! -f $MYEDITOR ]; then
......@@ -66,7 +66,8 @@ OPTIONS=( 1 "Realtime BrandMeister Activity"
8 "Restart BrandMeister and check"
9 "Tweet a text"
A "Check bans"
B "Update this script"
B "Add ban"
C "Update this script"
)
CHOICE=$(dialog --clear \
......@@ -87,7 +88,8 @@ case $CHOICE in
read -p "Event to search: " searchit
grep -i brandmeister /var/log/syslog | grep -i $searchit
echo "================= E N D ======================="
read -p "No more result. Press enter to continue"
echo ""
read -s -p "No more result. Press ENTER to continue"
$THISFILE
;;
3)
......@@ -107,7 +109,7 @@ case $CHOICE in
read -p 'Enter callsign:' callsign
echo "box.space.GlobalLicensees:select{'${callsign^^}'}" | /usr/bin/tarantoolctl connect /tmp/Registry.sock
echo ""
read -n 1 -s -p "Press any key to continue"
read -s -p "Press ENTER to continue"
$THISFILE
;;
7)
......@@ -124,7 +126,7 @@ case $CHOICE in
echo " ========================================"
/usr/bin/tarantoolctl restart Registry
echo " ========================================"
read -n1 -r -p "Upgrade process finished. Press a key." key
read -s -p "Upgrade process finished. Press ENTER to continue."
$THISFILE
;;
8)
......@@ -132,19 +134,40 @@ case $CHOICE in
$THISFILE
;;
9)
read -p "Text to tweet: " tweetit
echo ""
read -p "Text to tweet: " tweetit
/usr/bin/twidge update "$tweetit"
read -p "Done ! Press enter to continue"
echo ""
read -s -p "Done ! Press enter to continue"
$THISFILE
;;
A)
echo "box.space.StoredBans:select()" | /usr/bin/tarantoolctl connect /tmp/Registry.sock
read -n1 -r -p "End of list..." key
read -s -p "End of list... Press ENTER to continue"
$THISFILE
;;
B)
B) echo "Use this feature to prevent or stop audio loops"
read -p "ID to ban: " BANID
read -p "Hours to ban: " BANHOURS
echo ""
read -p "Current version $VSCRIPT . Ensure https://code.brandmeister.network is working, and press Enter to update"
read -n 1 -r -p "Adding ban on ID $BANID for $((BANHOURS*3600)) seconds ? [y/N]" WAITCONF
if [ -z "$WAITCONF" ]; then
echo ""
read -s -p "Cancelled! -- Press ENTER to continue"
elif [ ${WAITCONF,,} == 'y' ]; then
echo ""
echo "setStoredValue('Bans', $BANID , 0, 0,$(($BANHOURS*3600)))" | /usr/bin/tarantoolctl connect /tmp/Registry.sock
echo ""
read -s -p "Done -- Press ENTER to continue"
else
echo ""
read -s -p "Cancelled! -- Press ENTER to continue"
fi
$THISFILE
;;
C)
echo ""
read -s -p "Current version $VSCRIPT . Ensure https://code.brandmeister.network is working, and press Enter to update"
UPDFILE="$THISFILE.update"
OLDFILE="$THISFILE.old"
wget -O $UPDFILE https://code.brandmeister.network/F4BWG/NCursesMasterMenu/raw/master/bm-menu.sh
......@@ -157,6 +180,8 @@ case $CHOICE in
chmod 755 $THISFILE
echo "Update completed. Previous version saved as $OLDFILE"
fi
echo ""
read -s -p "Press ENTER to continue."
$THISFILE
;;
esac
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment