Update initial-setup

Re-factor for init setup syntax
This commit is contained in:
M0VUB 2023-01-03 23:49:49 +00:00 committed by GitHub
parent 5d84000276
commit 4d4ff7b3e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,21 +17,17 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# Main MENU system.....
# Initial Setup MENU system.....
while : ; do
menuopt=$(whiptail --title "HBlink3 Control Version 1.9PL" --menu "Select option by using the up and down arrows on your keyboard. Once selected please press enter:" 23 56 13 \
1 " Stop HBlink " \
2 " Start HBlink " \
3 " Restart HBlink " \
4 " Update HBlink / Docker " \
5 " Flush HBlink / Truncate Logs " \
6 " Edit HBlink Config " \
7 " Edit HBlink Rules " \
8 " Edit Dashboard Config " \
9 " Full Upgrade OBPMaster " \
10 " System Update / apt update " \
11 " Reboot Entire Server " \
12 " Shutdown Entire Server " 3>&1 1>&2 2>&3)
menuopt=$(whiptail --title "INTIAL SETUP - HBLINK3 DOCKER 1.9PL" --menu "Select option by using the up and down arrows on your keyboard. Once selected please press enter:" 23 56 13 \
1 " Re-Install " \
2 " Bash Shell (Type 'exit' to return to menu) " \
3 " Edit HBlink Config " \
4 " Edit HBlink Rules " \
5 " Edit Dashboard Config (Advanced) " \
6 " Edit Dashboard PHP Config (Advanced) " \
7 " System Update / apt update " \
8 " Finish Setup & Exit " 3>&1 1>&2 2>&3)
exitstatus=$?
# Back-end HBlink3 menu
if [ $exitstatus = 0 ]; then
@ -42,31 +38,23 @@ fi
# Action
case $menuopt in
1)
sudo /usr/local/sbin/hblink-stop ;;
sudo /opt/hblink3-docker-install/hblink3-docker-install.sh ;;
2)
sudo /usr/local/sbin/hblink-start ;;
sudo /usr/bin/bash ;;
3)
sudo /usr/local/sbin/hblink-restart ;;
4)
sudo /usr/local/sbin/hblink-update ;;
5)
sudo /usr/local/sbin/hblink-flush ;;
6)
sudo nano /etc/hblink3/hblink.cfg ;;
7)
4)
sudo nano /etc/hblink3/rules.py ;;
8)
5)
sudo nano /opt/HBMonv2/config.py ;;
9)
sudo /usr/local/sbin/hblink-upgrade ;;
10)
sudo apt-get update -y && sudo apt-get upgrade ;;
11)
sudo reboot ;;
12)
sudo shutdown now ;
6)
sudo nano /var/www/html/include/config.php ;;
7)
sudo apt update && apt upgrade ;;
8)
sudo hblink-flush && exit 0 ;;
esac
done
exit 0
# Wiptail menu system by ShaYmez https://github/ShaYmez
# Wiptail INITIAL SETUP by ShaYmez https://github/ShaYmez