forked from anandslab/AtoMiC-ToolKit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nzbget-menu.sh
executable file
·40 lines (38 loc) · 1.7 KB
/
nzbget-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
39
40
#!/bin/bash
# Script Name: AtoMiC NZBGet Menu
SUBCHOICE=$(whiptail --title "AtoMiC Toolkit - Manage NZBGet" \
--menu "What would you like to do?" --backtitle "$BACKTITLE" \
--fb --cancel-button "Exit" $LINES $COLUMNS "$NETLINES" \
"Install" "Install NZBGet" \
"Uninstall" "Uninstall NZBGet" \
"Backup" "Backup NZBGet settings" \
"Restore" "Restore NZBGet settings from a previous backup" \
"Enable Reverse Proxy" "Allow access" \
"Disable Reverse Proxy" "Remove access" \
"Reset Password" "Reset NZBGet WebUI password" \
"Access Details" "View NZBGet access details" \
"Access Switch" "Toggle NZBGet UI network accessibility" \
"Go Back" "Back to Main Menu" 3>&1 1>&2 2>&3)
exitstatus=$?
if [[ $exitstatus = 0 ]]; then
source "$SCRIPTPATH/nzbget/nzbget-constants.sh"
case "$SUBCHOICE" in
"Install" ) source "$SCRIPTPATH/nzbget/nzbget-installer.sh" ;;
"Uninstall" ) source "$SCRIPTPATH/nzbget/nzbget-uninstaller.sh" ;;
"Backup" ) source "$SCRIPTPATH/inc/app-backup-controller.sh" ;;
"Restore" ) source "$SCRIPTPATH/inc/app-restore-controller.sh" ;;
"Enable Reverse Proxy" ) source "$SCRIPTPATH/utils/nginx/nginx-enable-location.sh" ;;
"Disable Reverse Proxy" ) source "$SCRIPTPATH/utils/nginx/nginx-disable-location.sh" ;;
"Reset Password" )
source "$SCRIPTPATH/inc/app-password-reset-controller.sh" ;;
"Access Details" ) source "$SCRIPTPATH/inc/app-access-details.sh" ;;
"Access Switch" ) source "$SCRIPTPATH/inc/app-access-switch.sh" ;;
"Go Back" ) source "$SCRIPTPATH/menus/menu-usenet.sh" ;;
*) source "$SCRIPTPATH/inc/invalid-option.sh" ;;
esac
else
source "$SCRIPTPATH/inc/thankyou.sh"
echo
sleep 1
exit 0
fi