|
1 | 1 | #!/bin/bash |
| 2 | + |
2 | 3 | #CyberPanel Upgrade script |
3 | 4 |
|
4 | 5 | export LC_CTYPE=en_US.UTF-8 |
@@ -28,13 +29,6 @@ rm -f /etc/yum.repos.d/gf.repo |
28 | 29 | rm -f /etc/yum.repos.d/powerdns-auth-42.repo |
29 | 30 | rm -rf /etc/yum.repos.d/powerdns-auth-master.repo |
30 | 31 | 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 | | - |
38 | 32 |
|
39 | 33 | ## |
40 | 34 |
|
@@ -171,18 +165,27 @@ if echo $OUTPUT | grep -q "CentOS Linux 7" ; then |
171 | 165 | curl https://raw.githubusercontent.com/usmannasir/cyberpanel/v2.0.1/install/CyberPanel.repo > /etc/yum.repos.d/CyberPanel.repo |
172 | 166 | yum clean all |
173 | 167 | 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 |
174 | 171 | elif echo $OUTPUT | grep -q "CloudLinux 7" ; then |
175 | 172 | echo -e "\nDetecting CloudLinux 7.X...\n" |
176 | 173 | SERVER_OS="CentOS7" |
177 | 174 | curl https://raw.githubusercontent.com/usmannasir/cyberpanel/v2.0.1/install/CyberPanel.repo > /etc/yum.repos.d/CyberPanel.repo |
178 | 175 | yum clean all |
179 | 176 | 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 |
180 | 180 | elif echo $OUTPUT | grep -q "CentOS Linux 8" ; then |
181 | 181 | curl https://raw.githubusercontent.com/usmannasir/cyberpanel/v2.0.1/install/CyberPanel8.repo > /etc/yum.repos.d/CyberPanel.repo |
182 | 182 | echo -e "\nDetecting CentOS 8.X...\n" |
183 | 183 | SERVER_OS="CentOS8" |
184 | 184 | yum clean all |
185 | 185 | 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 |
186 | 189 | elif echo $OUTPUT | grep -q "Ubuntu 18.04" ; then |
187 | 190 | echo -e "\nDetecting Ubuntu 18.04...\n" |
188 | 191 | SERVER_OS="Ubuntu" |
|
285 | 288 | fi |
286 | 289 |
|
287 | 290 | check_return |
| 291 | + |
288 | 292 | if [ $SERVER_OS = "Ubuntu" ] ; then |
289 | 293 | . /usr/local/CyberCP/bin/activate |
290 | 294 | check_return |
|
0 commit comments