forked from SimpleHomelab/AtoMiC-ToolKit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathglances-menu.sh
executable file
·33 lines (31 loc) · 1.33 KB
/
glances-menu.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
# Script Name: AtoMiC Glances Menu
SUBCHOICE=$(whiptail --title "AtoMiC Toolkit - Manage glances" \
--menu "What would you like to do?" --backtitle "$BACKTITLE" \
--fb --cancel-button "Exit" $LINES $COLUMNS "$NETLINES" \
"Install" "Install Latest Glances" \
"Uninstall" "Uninstall Glances" \
"Manual Update" "Update Glances" \
"Enable Reverse Proxy" "Allow access" \
"Disable Reverse Proxy" "Remove access" \
"Access Details" "View Glances access details" \
"Go Back" "Back to Main Menu" 3>&1 1>&2 2>&3)
exitstatus=$?
if [[ $exitstatus = 0 ]]; then
source "$SCRIPTPATH/glances/glances-constants.sh"
case "$SUBCHOICE" in
"Install" ) source "$SCRIPTPATH/$APPNAME/$APPNAME-installer.sh" ;;
"Uninstall" ) source "$SCRIPTPATH/$APPNAME/$APPNAME-uninstaller.sh" ;;
"Manual Update" ) source "$SCRIPTPATH/$APPNAME/$APPNAME-update.sh" ;;
"Enable Reverse Proxy" ) source "$SCRIPTPATH/utils/nginx/nginx-enable-location.sh" ;;
"Disable Reverse Proxy" ) source "$SCRIPTPATH/utils/nginx/nginx-disable-location.sh" ;;
"Access Details" ) source "$SCRIPTPATH/inc/app-access-details.sh" ;;
"Go Back" ) source "$SCRIPTPATH/menus/menu-administration-tools.sh" ;;
*) source "$SCRIPTPATH/inc/invalid-option.sh" ;;
esac
else
source "$SCRIPTPATH/inc/thankyou.sh"
echo
sleep 1
exit 0
fi