Commit aa99d8e4 authored by F4BWG's avatar F4BWG

first version

parents
#############################################################
# NCurses-Based Bash Menu for BM Master Sysops #
# Questions/Comments: oli@f4bwg.com #
# Latest Version: #
# https://code.brandmeister.network/F4BWG/NCursesMasterMenu #
# Don't forget to update the TITLE menus below #
#############################################################
#!/bin/bash
HEIGHT=15
WIDTH=40
CHOICE_HEIGHT=6
BACKTITLE="BrandMeister 3021 Canada"
TITLE="BM-3021-CA"
MENU="Choose one of the following options:"
OPTIONS=(1 "View BrandMeister Activity"
2 "Edit BrandMeister Config"
3 "Tarantool Console"
4 "Update / Upgrade"
5 "Restart BrandMeister and check"
6 "Check bans")
CHOICE=$(dialog --clear \
--backtitle "$BACKTITLE" \
--title "$TITLE" \
--menu "$MENU" \
$HEIGHT $WIDTH $CHOICE_HEIGHT \
"${OPTIONS[@]}" \
2>&1 >/dev/tty)
clear
case $CHOICE in
1)
tail -f /var/log/syslog ; ~/bm-menu.sh
~/bm-menu.sh
;;
2)
emacs /opt/BrandMeister/BrandMeister.conf
~/bm-menu.sh
;;
3)
tarantoolctl connect /tmp/Registry.sock
~/bm-menu.sh
;;
4)
echo " ========================================"
echo " ========> Updating packages"
echo " ========================================"
apt-get update
echo " ========================================"
echo " ========> Starting upgrade process"
echo " ========================================"
apt-get upgrade
echo " ========================================"
echo " ========> Restarting tarantool"
echo " ========================================"
/usr/bin/tarantoolctl restart Registry
echo " ========================================"
read -n1 -r -p "Upgrade process finished..." key
~/bm-menu.sh
;;
5)
systemctl restart brandmeister ; tail -f /var/log/syslog
~/bm-menu.sh
;;
6)
echo "box.space.StoredBans:select()" | /usr/bin/tarantoolctl connect /tmp/Registry.sock
read -n1 -r -p "End of list..." key
~/bm-menu.sh
;;
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