-
Notifications
You must be signed in to change notification settings - Fork 0
/
aolmanager
executable file
·75 lines (60 loc) · 1.15 KB
/
aolmanager
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/bin/bash
# CONFIGURATION
INSTALL_DIR=/usr/lib/aolmanager
DEVICE=`cat /system/build.prop | grep ro.product.model | awk -F'=' '{print $2}'`
# DIALOG
DIALOG_CANCEL=1
HEIGHT=15
WIDTH=50
LHEIGHT=10
# COLOR CODE
RED='\033[0;31m'
NC='\033[0m'
YELLOW='\033[0;33m'
# CHECK DIALOG INSTALL
if [ ! -f /usr/bin/dialog ]; then
echo -e "${RED}[info]${NC}dialog not installed..."
apt-get update && apt-get install dialog -y
echo -e "${YELLOW}[info]${NC}dialog installed..."
fi
# MAIN MENU
function mainmenu() {
exec 3>&1
MAINSEL=$(dialog --backtitle "AndroidOverLinux Manager" \
--menu "aolmanager on [$DEVICE]" $HEIGHT $WIDTH $LHEIGHT \
"[1]" "System Information" \
"[2]" "Basic Configuration" \
"[3]" "Service Management" \
"[4]" "Install Service" \
"[5]" "Uninstall Service" \
"[6]" "Miscelaeous System Tweak" 2>&1 1>&3)
exit_status=$?
exec 3>&-
if [ "$exit_status" == "$DIALOG_CANCEL" ]; then
clear
exit 0
fi
case $MAINSEL in
"[1]")
;;
"[2]")
;;
"[3]")
;;
"[4]")
;;
"[5]")
;;
"[6]")
;;
*)
echo $MAINSEL
sleep 3
;;
esac
}
# 1. System Information
# aolmanager MAIN
while true; do
mainmenu
done