-
Notifications
You must be signed in to change notification settings - Fork 17
/
optimize-cpanel.sh
55 lines (47 loc) · 1.92 KB
/
optimize-cpanel.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
# Main banner
echo "######################################################################"
echo "# #"
echo "# cPanel Configuration, Hardening & Security Script #"
echo "# #"
echo "# Created by Ahtsham Jutt - ahtshamjutt.com #"
echo "# Email for queries: [email protected] #"
echo "# #"
echo "######################################################################"
# Pause to read the header
sleep 3
# Instruction message
echo -e "\n\nSelect the Option to Optimize your cPanel Server:"
echo ""
# Details about options
echo "############################################################################"
echo "# IMPORTANT: READ CAREFULLY BEFORE SELECTING #"
echo "# Option 1: Apache Web Server with MPM Event and PHP-FPM #"
echo "# Option 2: NGinx as Reverse Proxy (Engintron) with MPM Event and PHP-FPM #"
echo "############################################################################"
# Pause to read the options
sleep 2
# Options loop
while true; do
echo -e "\nOptions:"
echo "1. Optimize cPanel with Apache Web Server with MPM Event and PHP-FPM"
echo "2. Optimize cPanel with NGinx as Reverse Proxy (Engintron) with MPM Event and PHP-FPM"
# Get user choice
read -p "Enter your choice (1 or 2): " choice
# Action based on choice
case $choice in
1)
echo "Optimizing cPanel with Apache & PHP-FPM..."
chmod +x optimize-apache.sh && sh optimize-apache.sh
break
;;
2)
echo "Optimizing cPanel with NGinx & suPHP..."
chmod +x optimize-nginx.sh && sh optimize-nginx.sh
break
;;
*)
echo "Invalid choice. Please choose 1 or 2."
;;
esac
done