mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-06-08 19:39:59 +02:00
minor fix on upgrade
This commit is contained in:
@@ -18,6 +18,8 @@ else
|
||||
SERVER_COUNTRY="unknow"
|
||||
fi
|
||||
|
||||
SERVER_COUNTRY="CN"
|
||||
|
||||
if [[ $SERVER_COUNTRY == "CN" ]] ; then
|
||||
GIT_URL="gitee.com/qtwrk/cyberpanel"
|
||||
GIT_CONTENT_URL="gitee.com/qtwrk/cyberpanel/raw"
|
||||
@@ -152,19 +154,19 @@ rm -rf /usr/local/CyberPanel
|
||||
virtualenv -p /usr/bin/python3 --system-site-packages /usr/local/CyberPanel
|
||||
check_return
|
||||
rm -f requirments.txt
|
||||
wget https://$GIT_CONTENT_URL/${BRANCH_NAME}/requirments.txt
|
||||
wget -O requirements.txt https://$GIT_CONTENT_URL/${BRANCH_NAME}/requirments.txt
|
||||
. /usr/local/CyberPanel/bin/activate
|
||||
check_return
|
||||
|
||||
if [ $SERVER_OS = "Ubuntu" ] ; then
|
||||
. /usr/local/CyberPanel/bin/activate
|
||||
check_return
|
||||
pip3 install --ignore-installed -r requirments.txt
|
||||
pip3 install --ignore-installed -r requirements.txt
|
||||
check_return
|
||||
else
|
||||
source /usr/local/CyberPanel/bin/activate
|
||||
check_return
|
||||
pip3.6 install --ignore-installed -r requirments.txt
|
||||
pip3.6 install --ignore-installed -r requirements.txt
|
||||
check_return
|
||||
fi
|
||||
|
||||
@@ -174,14 +176,13 @@ rm -rf upgrade.py
|
||||
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/%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|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
|
||||
|
||||
/usr/local/CyberPanel/bin/python upgrade.py $BRANCH_NAME
|
||||
check_return
|
||||
##
|
||||
|
||||
virtualenv -p /usr/bin/python3 /usr/local/CyberCP
|
||||
check_return
|
||||
wget -O requirements.txt https://$GIT_CONTENT_URL/${BRANCH_NAME}/requirments.txt
|
||||
@@ -189,12 +190,12 @@ wget -O requirements.txt https://$GIT_CONTENT_URL/${BRANCH_NAME}/requirments.txt
|
||||
if [ $SERVER_OS = "Ubuntu" ] ; then
|
||||
. /usr/local/CyberCP/bin/activate
|
||||
check_return
|
||||
pip3 install --ignore-installed -r requirments.txt
|
||||
pip3 install --ignore-installed -r requirements.txt
|
||||
check_return
|
||||
else
|
||||
source /usr/local/CyberCP/bin/activate
|
||||
check_return
|
||||
pip3.6 install --ignore-installed -r requirments.txt
|
||||
pip3.6 install --ignore-installed -r requirements.txt
|
||||
check_return
|
||||
fi
|
||||
|
||||
|
||||
@@ -1499,7 +1499,7 @@ CSRF_COOKIE_SECURE = True
|
||||
if os.path.exists(lscpdPath):
|
||||
os.remove(lscpdPath)
|
||||
|
||||
command = 'wget https://raw.githubusercontent.com/usmannasir/cyberpanel/v1.9.4/lscpd-0.2.4 -P /usr/local/lscp/bin/'
|
||||
command = 'cp -f /usr/local/CyberCP/lscpd-0.2.4 /usr/local/lscp/bin/lscpd-0.2.4'
|
||||
Upgrade.executioner(command, command, 0)
|
||||
|
||||
command = 'rm -f /usr/local/lscp/bin/lscpd'
|
||||
|
||||
Reference in New Issue
Block a user