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