forked from anandslab/AtoMiC-ToolKit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
madsonic-menu.sh
executable file
·38 lines (36 loc) · 1.6 KB
/
madsonic-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
34
35
36
37
38
#!/bin/bash
# Script Name: AtoMiC Madsonic Menu
SUBCHOICE=$(whiptail --title "AtoMiC Toolkit - Manage Madsonic" \
--menu "What would you like to do?" --backtitle "$BACKTITLE" \
--fb --cancel-button "Exit" $LINES $COLUMNS "$NETLINES" \
"Install" "Install Madsonic" \
"Uninstall" "Uninstall Madsonic" \
"Backup" "Backup Madsonic settings" \
"Restore" "Restore Madsonic settings from a previous backup" \
"Manual Update" "Manually update Madsonic" \
"Enable Reverse Proxy" "Allow access" \
"Disable Reverse Proxy" "Remove access" \
"Access Details" "View Madsonic access details" \
"Go Back" "Back to Main Menu" 3>&1 1>&2 2>&3)
exitstatus=$?
if [[ $exitstatus = 0 ]]; then
source "$SCRIPTPATH/madsonic/madsonic-constants.sh"
case "$SUBCHOICE" in
"Install" ) source "$SCRIPTPATH/$APPNAME/$APPNAME-installer.sh" ;;
"Uninstall" ) source "$SCRIPTPATH/$APPNAME/$APPNAME-uninstaller.sh" ;;
"Backup" ) source "$SCRIPTPATH/inc/app-backup-controller.sh" ;;
"Restore" ) source "$SCRIPTPATH/inc/app-restore-controller.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-personal-media-servers.sh" ;;
*) source "$SCRIPTPATH/inc/invalid-option.sh" ;;
esac
else
source "$SCRIPTPATH/inc/thankyou.sh"
echo
sleep 1
exit 0
fi