Skip to content

Commit

Permalink
bug fix: upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
usmannasir committed Apr 11, 2020
1 parent 291518f commit a6228d4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cyberpanel_upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,15 @@ fi


if [[ -f /usr/local/CyberPanel/bin/python2 ]] ; then
echo -e "\nPython 2 dectected, doing resetup...\n"
rm -rf /usr/local/CyberPanel/bin
virtualenv -p /usr/bin/python3 --system-site-packages /usr/local/CyberPanel
check_return
elif [[ -f /usr/local/CyberPanel/bin/ ]] ; then
echo -e "\nNo need to resetup virtualenv at /usr/local/CyberPanel...\n"
else
virtualenv -p /usr/bin/python3 --system-site-packages /usr/local/CyberPanel
echo -e "\nNothing found, need fresh setup...\n"
virtualenv -p /usr/bin/python3 --system-site-packages /usr/local/CyberPanel
check_return
fi

Expand Down Expand Up @@ -259,7 +261,7 @@ wget https://$GIT_CONTENT_URL/${BRANCH_NAME}/plogical/upgrade.py
if [[ $SERVER_COUNTRY == "CN" ]] ; then
sed -i 's|wget https://raw.githubusercontent.com/usmannasir/cyberpanel/v1.9.4/lscpd-0.2.4 -P /usr/local/lscp/bin/|cp -f /usr/local/CyberCP/lscpd-0.2.4 /usr/local/lscp/bin/lscpd-0.2.4|g' upgrade.py
sed -i 's|wget https://raw.githubusercontent.com/usmannasir/cyberpanel/%s/lscpd-0.2.4 -P /usr/local/lscp/bin/|cp -f /usr/local/CyberCP/lscpd-0.2.4 /usr/local/lscp/bin/lscpd-0.2.4|g' upgrade.py
sed -i $'s/0.2.4\' % (branch)/0.2.4\'/' upgrade.py
#sed -i $'s/0.2.4\' % (branch)/0.2.4\'/' upgrade.py
sed -i 's|raw.githubusercontent.com/usmannasir/cyberpanel|'${GIT_CONTENT_URL}'|g' upgrade.py
sed -i 's|git clone https://github.com/usmannasir/cyberpanel|git clone https://'${GIT_URL}'|g' upgrade.py
fi
Expand Down

0 comments on commit a6228d4

Please sign in to comment.