-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall
More file actions
83 lines (70 loc) · 2.47 KB
/
install
File metadata and controls
83 lines (70 loc) · 2.47 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
75
76
77
78
79
80
81
82
83
#!/bin/bash
############################################################################################
# aodieuVPS Script Installer v1.0
# To install aodieuVPS Script type:
# curl -sO https://raw.githubusercontent.com/aodieu/aodieuVPS/github/install && bash install
############################################################################################
if [ $(id -u) != "0" ]; then
echo "You need to be root to perform this command. Run \"sudo su\" to become root!"
exit
fi
if [ -f /var/cpanel/cpanel.config ]; then
clear
echo "Your server installed WHM/Cpanel, please reinstall to use aodieuVPS Script."
exit
fi
if [ -f /etc/psa/.psa.shadow ]; then
clear
echo "Your server installed Plesk, please reinstall to use aodieuVPS Script."
exit
fi
if [ -f /etc/init.d/directadmin ]; then
clear
echo "Your server installed DirectAdmin, please reinstall to use aodieuVPS Script."
exit
fi
if [ -f /etc/init.d/webmin ]; then
clear
echo "Your server installed Webmin, please reinstall to use aodieuVPS Script."
exit
fi
if [[ -z "$(cat /etc/resolv.conf)" ]]; then
echo ""
echo "/etc/resolv.conf is empty. No nameserver resolvers detected !! "
echo "Please configure your /etc/resolv.conf correctly or you will not"
echo "be able to use the internet or download from your server."
echo "aborting script... please re-run install"
echo ""
exit
fi
centos_version=$(rpm -E %centos)
rhel_version=$(rpm -E %rhel)
# Detect OS version (CentOS or Rocky Linux)
if [ -f /etc/rocky-release ]; then
os_version=$rhel_version
elif [ -f /etc/centos-release ]; then
os_version=$centos_version
else
os_version=$rhel_version
fi
if [ "$os_version" != "6" ] && [ "$os_version" != "7" ] && [ "$os_version" != "8" ]; then
echo "aodieuVPS Script is only compatible with CentOS 6, CentOS 7, or Rocky Linux 8"
echo "aborting script..."
exit
fi
if [ -f /etc/aodieuvps/scripts.conf ]; then
echo "========================================================================="
echo "Server/VPS cua ban da cai san aodieuVPS Script"
echo "Hay su dung lenh aodieuvps de truy cap menu quan ly"
echo "Chao tam biet !"
echo "========================================================================="
exit
fi
rm -f install*
cd /root/
rm -f install*
if [ "$1" = "wordpress" ]; then
curl -sO https://raw.githubusercontent.com/aodieu/aodieuVPS/github/scripts/$os_version/install.sh && bash install.sh wordpress
else
curl -sO https://raw.githubusercontent.com/aodieu/aodieuVPS/github/scripts/$os_version/install.sh && bash install.sh
fi