Skip to content

Commit

Permalink
bug fix: upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
usmannasir committed Aug 6, 2024
1 parent e16f12c commit 55d4762
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion cyberpanel_upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,11 @@ fi
Download_Requirement() {
for i in {1..50};
do
wget -O /usr/local/requirments.txt "${Git_Content_URL}/${Branch_Name}/requirments.txt"
if [[ "$Server_OS_Version" = "22" ]] || [[ "$Server_OS_Version" = "9" ]]; then
wget -O /usr/local/requirments.txt "${Git_Content_URL}/${Branch_Name}/requirments.txt"
else
wget -O /usr/local/requirments.txt "${Git_Content_URL}/${Branch_Name}/requirments-old.txt"
fi
if grep -q "Django==" /usr/local/requirments.txt ; then
break
else
Expand Down Expand Up @@ -609,6 +613,11 @@ Main_Upgrade() {
/usr/local/CyberPanel/bin/python upgrade.py "$Branch_Name"
Check_Return

rm -rf /usr/local/CyberCP/bin
rm -rf /usr/local/CyberCP/lib
rm -rf /usr/local/CyberCP/lib64
rm -rf /usr/local/CyberCP/pyvenv.cfg

if [[ -f /usr/local/CyberCP/bin/python2 ]]; then
rm -rf /usr/local/CyberCP/bin
virtualenv -p /usr/bin/python3 /usr/local/CyberCP
Expand Down

0 comments on commit 55d4762

Please sign in to comment.