Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
F4BWG Oliver
NCursesMasterMenu
Commits
fd959740
Commit
fd959740
authored
Nov 28, 2017
by
F4BWG
Browse files
v15
parent
f84b4e51
Changes
3
Hide whitespace changes
Inline
Side-by-side
HISTORY
View file @
fd959740
==== 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
...
...
VERSION
0 → 100644
View file @
fd959740
15
\ No newline at end of file
bm-menu.sh
View file @
fd959740
#####################################################################################
# NCurses-Based Bash Menu for BM Master Sysops
# Version: 1
.4
# Version: 1
5
#
# 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
=
"1
5
"
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment