-
Notifications
You must be signed in to change notification settings - Fork 3
/
eidolos.sh
174 lines (153 loc) · 4.37 KB
/
eidolos.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
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
#!/bin/bash
#
# Twitter.com/EidolonHost
# EidolonHost is at https://eidolonhost.com
# Pretty Colors
OK='\e[1;32m'
OK2='\e[1;36m'
OK3='\e[1;33m'
WARNING='\e[1;31m'
FAIL='\e[2;30m'
ENDC='\033[0m'
# Am I root?
if [ "x$(id -u)" != 'x0' ]; then
echo -e "$WARNING Error: this script can only be executed by root $ENDC"
exit 1
fi
# Check supported arch.
if [ "$(arch)" != 'x86_64' ]; then
arch='i386'
else
arch="amd64"
fi
# Sets up showMenu stuff.
showMenu () {
clear
echo "";
echo "[+]-----------------------------------------------------------------------------[+]"
echo -e "$OK _|_|_| _|_|_|_| _|_|_| _|_| _| _|_| _|_|_| $ENDC ";
echo -e "$OK _| _| _| _| _| _| _| _| _| _| $ENDC ";
echo -e "$OK _|_|_| _| _| _| _| _| _| _| _| _|_|_| $ENDC ";
echo -e "$OK _| _| _| _| _| _| _| _| _| _| $ENDC ";
echo -e "$OK _|_|_| _|_|_|_| _|_|_| _|_| _|_|_| _|_| _|_|_| $ENDC ";
echo -e "$OK $ENDC ";
echo "[+]-----------------------------------------------------------------------------[+]"
echo " ";
echo " Welcome to EidolosScript";
echo " build 0.2 on April 17th 2015";
echo " eidolonhost.com - [email protected]";
echo -e "$WARNING GNU General Public License -- GPL v2 1991 — See included LICENSE. $ENDC"
echo "Current time: $(date)";
echo -e "$OK2 You are running on: $(arch), on $OS $ENDC";
echo " ";
echo -e "$OK3 InterWorx Install: $ENDC ";
echo " interworx -------------- Install latest InterWorx."
echo -e "$OK3 cPanel Install: $ENDC";
echo " cpanel -------------- Install latest cPanel."
echo " cpdnsonly ----------- Install cPanel DNSOnly."
echo " updates ------------ Updates OS, updates cPanel if applicable."
echo " ";
echo -e "$OK3 Alternative Control Panels: $ENDC ";
echo " webmin -------------- Install latest Webmin"
echo " vestacp -------------- Install latest VestaCP for Linux."
echo " ehcp -------------- Install latest EHCP for Linux."
echo " ezee -------------- Install latest Ezeelogin."
echo " ";
echo -e "$OK3 SSL Tools: $ENDC ";
echo " sslcheck -------------- Checks SSL certificates installed and helps resolve SSL installs."
echo " ";
echo -e "$OK3 CloudLinux Install: $ENDC ";
echo " regcloudlinux ------- Register with CloudLinux Network."
echo " cloudlinux ---------- Install CloudLinux on your system (License and Reboot required)."
echo " ";
echo -e "$OK3 Plugins - Addons and Secure: $ENDC ";
echo " addsec ---------- Additional Scripts for Security and Addons"
echo " exit ---------- Leave"
echo " ";
echo -n "Enter your desired function: "
}
# Does some more showMenu stuff. Not sure what this does?
while :
do
showMenu
read -r yourch
case $yourch in
# The rest of Eidolos Script!
interworx ) date
cd /home || exit
yum -y install wget perl curl
sh <((curl -sL interworx.com/inst.sh))
showMenu
;;
vestacp ) date
wget http://vestacp.com/pub/vst-install.sh
chmod +x vst-install.sh
sh vst-install.sh
showMenu
;;
ehcp ) date
wget -O ehcp.tgz www.ehcp.net/ehcp_2004.tgz
tar -zxvf ehcp.tgz
cd ehcp || exit
./install.sh
showMenu
;;
sslcheck ) date
wget https://github.com/zakjan/cert-chain-resolver/blob/master/src/cert-chain-resolver.sh
chmod +x cert-chain-resolver.sh
./cert-chain-resolver.sh
showMenu
;;
addsec ) date
sh addon.sh
showMenu
;;
cpanel ) date
cd /home || exit
yum -y install wget perl curl
sh <((curl -sL httpupdate.cpanel.net/latest))
showMenu
;;
cpdnsonly ) date
cd /home || exit
yum -y install wget perl curl
sh <((curl -sL httpupdate.cpanel.net/latest-dnsonly))
showMenu
;;
# Let's try handling updating the OSes by way of auto-detect what OS then use yum/apt accordingly.
updates ) date
if [ "$OS" == "CentOS" ]
then
yum update -y
/scripts/upcp --force
else
apt-get update -y
fi
showMenu
;;
cloudlinux ) echo -e "Installing CloudLinux. License will be activated automatically. Stand by..."
wget https://repo.cloudlinux.com/cloudlinux/sources/cln/cldeploy
sh cldeploy -i
uname -r; cat /etc/os-release
echo "Initiating reboot."
sleep 4
reboot
showMenu
;;
regcloudlinux ) echo -e "Please enter your CloudLinux key: "
read -r clkey
echo "Key entered: $clkey"
yum install rhn-setup
rhnreg_ks --activationkey="$clkey" --force
echo "Successfully Registered Your Server to CloudLinux Network (CLN)!"
sleep 5
showMenu
;;
exit ) exit
showMenu
;;
*) echo -e "$FAIL ERROR! $ENDC";
echo "Press Enter to continue..." ;
read -r ;;
esac
done