-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdatabase-tools-menu.sh
More file actions
74 lines (69 loc) · 2.57 KB
/
Copy pathdatabase-tools-menu.sh
File metadata and controls
74 lines (69 loc) · 2.57 KB
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
#!/usr/bin/env bash
#----------------------------------------------------------------------------------
# EngineScript - A High-Performance WordPress Server Built on Ubuntu and Cloudflare
#----------------------------------------------------------------------------------
# Website: https://EngineScript.com
# GitHub: https://github.com/Enginescript/EngineScript
# License: GPL v3.0
#----------------------------------------------------------------------------------
# EngineScript Variables
source /usr/local/bin/enginescript/enginescript-variables.txt || { echo "Error: Failed to source /usr/local/bin/enginescript/enginescript-variables.txt" >&2; exit 1; }
source /home/EngineScript/enginescript-install-options.txt || { echo "Error: Failed to source /home/EngineScript/enginescript-install-options.txt" >&2; exit 1; }
# Source shared functions library
source /usr/local/bin/enginescript/scripts/functions/shared/enginescript-common.sh || { echo "Error: Failed to source /usr/local/bin/enginescript/scripts/functions/shared/enginescript-common.sh" >&2; exit 1; }
#----------------------------------------------------------------------------------
# Start Main Script
# Main Menu
while true
do
clear
echo -e "Server Tools" | boxes -a c -d shell -p a1l2
echo ""
echo ""
PS3='Please enter your choice: '
secoptions=(
"Analyze All Tables & Databases"
"MariaDB Diagnostic & Recovery"
"MariaDB-Check Database Optimizer"
"MySQLreport"
"MySQLtuner"
"Exit Server Tools"
)
select secopt in "${secoptions[@]}"
do
case $secopt in
"Analyze All Tables & Databases")
/usr/local/bin/enginescript/scripts/functions/server-tools/analyze-tables.sh
break
;;
"MariaDB Diagnostic & Recovery")
/usr/local/bin/enginescript/scripts/functions/mariadb-diagnostic.sh
echo ""
read -n 1 -s -r -p "Press any key to continue"
echo ""
break
;;
"MariaDB-Check Database Optimizer")
/usr/local/bin/enginescript/scripts/functions/server-tools/mariadbcheck.sh
break
;;
"MySQLreport")
mysqlreport
echo ""
echo ""
read -n 1 -s -r -p "Press any key to continue"
echo ""
echo ""
break
;;
"MySQLtuner")
/usr/local/bin/enginescript/scripts/functions/server-tools/mysqltuner.sh
break
;;
"Exit Server Tools")
exit
;;
*) echo "Invalid option.";;
esac
done
done