Skip to content

Commit 47e93ea

Browse files
committed
remove redundant steps
1 parent 4e53857 commit 47e93ea

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

cyberpanel_upgrade.sh

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/bash
2+
23
#CyberPanel Upgrade script
34

45
export LC_CTYPE=en_US.UTF-8
@@ -28,13 +29,6 @@ rm -f /etc/yum.repos.d/gf.repo
2829
rm -f /etc/yum.repos.d/powerdns-auth-42.repo
2930
rm -rf /etc/yum.repos.d/powerdns-auth-master.repo
3031
rm -rf /etc/yum.repos.d/gf.repo.rpmnew
31-
#sed -i 's|enabled=1|enabled=0|g' /etc/yum.repos.d/CentOS-AppStream.repo
32-
yum clean all
33-
yum update -y
34-
yum autoremove epel-release -y
35-
rm -f /etc/yum.repos.d/epel.repo
36-
rm -f /etc/yum.repos.d/epel.repo.rpmsave
37-
3832

3933
##
4034

@@ -171,18 +165,27 @@ if echo $OUTPUT | grep -q "CentOS Linux 7" ; then
171165
curl https://raw.githubusercontent.com/usmannasir/cyberpanel/v2.0.1/install/CyberPanel.repo > /etc/yum.repos.d/CyberPanel.repo
172166
yum clean all
173167
yum update -y
168+
yum autoremove epel-release -y
169+
rm -f /etc/yum.repos.d/epel.repo
170+
rm -f /etc/yum.repos.d/epel.repo.rpmsave
174171
elif echo $OUTPUT | grep -q "CloudLinux 7" ; then
175172
echo -e "\nDetecting CloudLinux 7.X...\n"
176173
SERVER_OS="CentOS7"
177174
curl https://raw.githubusercontent.com/usmannasir/cyberpanel/v2.0.1/install/CyberPanel.repo > /etc/yum.repos.d/CyberPanel.repo
178175
yum clean all
179176
yum update -y
177+
yum autoremove epel-release -y
178+
rm -f /etc/yum.repos.d/epel.repo
179+
rm -f /etc/yum.repos.d/epel.repo.rpmsave
180180
elif echo $OUTPUT | grep -q "CentOS Linux 8" ; then
181181
curl https://raw.githubusercontent.com/usmannasir/cyberpanel/v2.0.1/install/CyberPanel8.repo > /etc/yum.repos.d/CyberPanel.repo
182182
echo -e "\nDetecting CentOS 8.X...\n"
183183
SERVER_OS="CentOS8"
184184
yum clean all
185185
yum update -y
186+
yum autoremove epel-release -y
187+
rm -f /etc/yum.repos.d/epel.repo
188+
rm -f /etc/yum.repos.d/epel.repo.rpmsave
186189
elif echo $OUTPUT | grep -q "Ubuntu 18.04" ; then
187190
echo -e "\nDetecting Ubuntu 18.04...\n"
188191
SERVER_OS="Ubuntu"
@@ -285,6 +288,7 @@ else
285288
fi
286289

287290
check_return
291+
288292
if [ $SERVER_OS = "Ubuntu" ] ; then
289293
. /usr/local/CyberCP/bin/activate
290294
check_return

0 commit comments

Comments
 (0)