From c7c7559a87120c7e25366f63ded52759a8cf0aba Mon Sep 17 00:00:00 2001 From: Bogdan Ilisei Date: Tue, 3 Mar 2020 22:47:22 +0200 Subject: [PATCH 01/11] Fixed --password issue This fixes the length check for the argument length supplied to `--password`, specifically: `./cyberpanel.sh: line 1554: [: testpassw0rd: integer expression expected` --- cyberpanel.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cyberpanel.sh b/cyberpanel.sh index 14afc9e2d..95a97e04c 100644 --- a/cyberpanel.sh +++ b/cyberpanel.sh @@ -1555,7 +1555,7 @@ else elif [[ "${1}" == 'r' ]] || [[ $1 == 'random' ]] ; then ADMIN_PASS=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 16 ; echo '') else - if [ ${1} -lt 8 ] ; then + if [ ${#1} -lt 8 ] ; then echo -e "\nPassword lenth less than 8 digital, please choose a more complicated password.\n" exit fi From eb0f6229a7b91a8d0657461b869cf5a434d67963 Mon Sep 17 00:00:00 2001 From: qtwrk Date: Wed, 4 Mar 2020 00:58:27 +0100 Subject: [PATCH 02/11] Create install.sh --- install.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 install.sh diff --git a/install.sh b/install.sh new file mode 100644 index 000000000..a517e0d0e --- /dev/null +++ b/install.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +OUTPUT=$(cat /etc/*release) +if echo $OUTPUT | grep -q "CentOS Linux 7" ; then + echo "Checking and installing curl and wget" +yum install curl wget -y 1> /dev/null +yum update curl wget ca-certificates -y 1> /dev/null + SERVER_OS="CentOS" +elif echo $OUTPUT | grep -q "CentOS Linux 8" ; then + echo -e "\nDetecting Centos 8...\n" + SERVER_OS="CentOS8" +yum install curl wget -y 1> /dev/null +yum update curl wget ca-certificates -y 1> /dev/null +elif echo $OUTPUT | grep -q "CloudLinux 7" ; then + echo "Checking and installing curl and wget" +yum install curl wget -y 1> /dev/null +yum update curl wget ca-certificates -y 1> /dev/null + SERVER_OS="CloudLinux" +elif echo $OUTPUT | grep -q "Ubuntu 18.04" ; then +apt install -y -qq wget curl + SERVER_OS="Ubuntu" +else + echo -e "\nUnable to detect your OS...\n" + echo -e "\nCyberPanel is supported on Ubuntu 18.04, CentOS 7.x and CloudLinux 7.x...\n" + exit 1 +fi + +rm -f cyberpanel.sh +rm -f install.tar.gz +curl --silent -o cyberpanel.sh "https://cyberpanel.sh/?dl&$SERVER_OS" 2>/dev/null +chmod +x cyberpanel.sh +./cyberpanel.sh $@ From 4c330eda9d849d8e26c8d9cea552d3d0ce54b432 Mon Sep 17 00:00:00 2001 From: Bogdan Ilisei Date: Wed, 4 Mar 2020 14:06:49 +0200 Subject: [PATCH 03/11] Rewriting install.sh Putting some make-up on the install.sh script" - This relies on the `/etc/os-release` file which is present on all modern distributions that you are currently supporting. More info on: https://www.freedesktop.org/software/systemd/man/os-release.html - I've taken the liberty of including a warning message for CentOS 8 / CloudLinux 8 - I've also derived `SERVER_OS` from the proper strings. I suggest you end up using a variable directly from `/etc/os-release` instead, tough, as it's just extra-fluff right now, and it seems you are using it just for statistics purposes - I have also switched to using `printf >&2` to output the messages to `stderr` instead of `stdout` because they are technically warnings --- install.sh | 58 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 32 insertions(+), 26 deletions(-) diff --git a/install.sh b/install.sh index a517e0d0e..903bac16d 100644 --- a/install.sh +++ b/install.sh @@ -1,32 +1,38 @@ #!/bin/sh -OUTPUT=$(cat /etc/*release) -if echo $OUTPUT | grep -q "CentOS Linux 7" ; then - echo "Checking and installing curl and wget" -yum install curl wget -y 1> /dev/null -yum update curl wget ca-certificates -y 1> /dev/null - SERVER_OS="CentOS" -elif echo $OUTPUT | grep -q "CentOS Linux 8" ; then - echo -e "\nDetecting Centos 8...\n" - SERVER_OS="CentOS8" -yum install curl wget -y 1> /dev/null -yum update curl wget ca-certificates -y 1> /dev/null -elif echo $OUTPUT | grep -q "CloudLinux 7" ; then - echo "Checking and installing curl and wget" -yum install curl wget -y 1> /dev/null -yum update curl wget ca-certificates -y 1> /dev/null - SERVER_OS="CloudLinux" -elif echo $OUTPUT | grep -q "Ubuntu 18.04" ; then -apt install -y -qq wget curl - SERVER_OS="Ubuntu" +if [ -f "/etc/os-release" ]; then + . /etc/os-release else - echo -e "\nUnable to detect your OS...\n" - echo -e "\nCyberPanel is supported on Ubuntu 18.04, CentOS 7.x and CloudLinux 7.x...\n" - exit 1 + ID="unsupported" + PRETTY_NAME="Your OS does not have a /etc/os-release file" fi -rm -f cyberpanel.sh -rm -f install.tar.gz -curl --silent -o cyberpanel.sh "https://cyberpanel.sh/?dl&$SERVER_OS" 2>/dev/null +if [ "$ID" = "ubuntu" ] && [ "$UBUNTU_CODENAME" = "bionic" ]; then + export DEBIAN_FRONTEND=noninteractive + apt -q -y -o Dpkg::Options::=--force-confnew update + apt -q -y -o Dpkg::Options::=--force-confnew install wget curl + SERVER_OS="$NAME" +elif [ "$ID" = "centos" ] || [ "$ID" = "cloudlinux" ]; then + case "$VERSION_ID" in + 7|7.*) + yum install curl wget -y 1> /dev/null + yum update curl wget ca-certificates -y 1> /dev/null + SERVER_OS="$NAME" + ;; + 8|8.*) + printf >&2 '\nCentOS 8/CloudLinux 8 support is currently experimental!\n' + yum install curl wget -y 1> /dev/null + yum update curl wget ca-certificates -y 1> /dev/null + SERVER_OS="${NAME}${VERSION_ID}" + ;; + esac +else + printf >&2 '\nYour OS -- %s -- is not currently supported!\n' "$PRETTY_NAME" + printf >&2 '\nCyberPanel is currently supported on Ubuntu 18.04, CentOS 7 and CloudLinux 7.\n' + exit 1 +fi + +rm -f cyberpanel.sh install.tar.gz +curl --silent -o cyberpanel.sh "https://cyberpanel.sh/?dl&${SERVER_OS}" 2>/dev/null chmod +x cyberpanel.sh -./cyberpanel.sh $@ +./cyberpanel.sh "$@" From 3c1ba8cbbca9386fc71b4b3a8819473829360916 Mon Sep 17 00:00:00 2001 From: qtwrk Date: Wed, 4 Mar 2020 14:00:55 +0100 Subject: [PATCH 04/11] remove white space and unwanted string --- install.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index 903bac16d..223556eb8 100644 --- a/install.sh +++ b/install.sh @@ -1,6 +1,6 @@ #!/bin/sh -if [ -f "/etc/os-release" ]; then +if [ -f "/etc/os-release" ]; then . /etc/os-release else ID="unsupported" @@ -11,28 +11,32 @@ if [ "$ID" = "ubuntu" ] && [ "$UBUNTU_CODENAME" = "bionic" ]; then export DEBIAN_FRONTEND=noninteractive apt -q -y -o Dpkg::Options::=--force-confnew update apt -q -y -o Dpkg::Options::=--force-confnew install wget curl - SERVER_OS="$NAME" + SERVER_OS="Ubuntu" elif [ "$ID" = "centos" ] || [ "$ID" = "cloudlinux" ]; then case "$VERSION_ID" in 7|7.*) yum install curl wget -y 1> /dev/null yum update curl wget ca-certificates -y 1> /dev/null - SERVER_OS="$NAME" + if [[ "$ID" == "centos" ]] ; then + SERVER_OS="CentOS" + else + SERVER_OS="CloudLinux" + fi ;; 8|8.*) printf >&2 '\nCentOS 8/CloudLinux 8 support is currently experimental!\n' yum install curl wget -y 1> /dev/null yum update curl wget ca-certificates -y 1> /dev/null - SERVER_OS="${NAME}${VERSION_ID}" + SERVER_OS="CentOS8" ;; esac -else +else printf >&2 '\nYour OS -- %s -- is not currently supported!\n' "$PRETTY_NAME" printf >&2 '\nCyberPanel is currently supported on Ubuntu 18.04, CentOS 7 and CloudLinux 7.\n' exit 1 fi -rm -f cyberpanel.sh install.tar.gz +rm -f cyberpanel.sh install.tar.gz curl --silent -o cyberpanel.sh "https://cyberpanel.sh/?dl&${SERVER_OS}" 2>/dev/null chmod +x cyberpanel.sh ./cyberpanel.sh "$@" From 62bb67e4d6c1b05db92f2d779ced96498c2af700 Mon Sep 17 00:00:00 2001 From: Lorin Halpert Date: Wed, 4 Mar 2020 16:35:12 -0500 Subject: [PATCH 05/11] Delete .DS_Store It is listed in .gitignore file - OSX metadata file unrelated to project, must have been left over from time prior commit or from a client that does not follow .gitignore rules --- .DS_Store | Bin 12292 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index db680f6a49c337d0d2dee003c12c0380158c9c51..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12292 zcmeHNOK%)S5U%!f*N=Fe#BqW^T45nYim~k2!M0Eo$4MZDge+MnaY%x*kMVl&cxE#@ z>qm@{FFa1113v%>@dr2|E=X`foRGNi2RI-hE?mM_J+pRq&zgh_M9H)?-MusQb#+xw zS9R4a5sBG)d5q{d5v6c(o9RLI5mB}qty1_oU$N4PI|A2vTb>v(R3DdrrnRCK%|`d~q?;yV8DA?lG6R28ss{Ws&d>#P=SRWSnmqv>zL^-IBHD=;=?2>`_(mlxu*K~;=@PL7uRdmC_D2*vFg~hV083n(bC%1-qD##b)~v`yYA$dz4d%h z2NTt%L^kU}d*4C-%@!{;Lsp;+E?AGMu=x}yo{FUwPbZYRWvD0&RS2yo(y}$jz zXILT>5&0783xDs{pQFc$)D&Zv)*?a0Hw{65&14#)rn|a(dJptv`VSuJKioesaAff4 zz_I6!J-?VaR4kNMDn3v8oacD{tW&oZ?2_l^?fce3U~L54Svi9<+*=jjE?-$%s#(E;(!aTw>8q7|&v9~I%?@nOy?MI^-OmNq>YTgef#Vu< zeWl8eYS%5lhBk&-xZ@OxmUG3O^@6}#y;<=6f?Kg>H<^-0gCIHI;*lipe6>)r-OA9J z-$Qi{&Ey&#PBNloh>eacLo@y-vXjb)^t|i2R(fdW&FEo@PS9C;126qDt<$IUIekH2 z(|7a>{YHO@HgQC}C{Bn8aax=a7scD+s+bqo#5>|vh;M1E?hDa)Q6tLe#8!7Lzn5^t z^B%eSb-68EY;q6pLOE_w#2?1?=+kg>YDzPXZYdb(LqL1dNG@SJZb(DshI}a}=fIoP zFi|Z(8l&`L6d&BKp{<}-kRyy>++}@px1KhTX}St0a25&O%Vo**WA7SwxGgqZCI;?A!}MsF zyi8FCn6ZIthjVy5+|z3E_EnUzISxUgD_C%s7V$blkx;3J#kc7`mNG!=@r$o7zVz3s zZ|jh_kiMkTvJcgkB85@mEm59KwZa-S)z(Qvh^@6WD`dp>)P*J*-O@1XBNHmaWAkn~+t${42*M}ot z7&R^<3&6fRfZgXKufrZdxBHFn?;NE{(OTgfs$?5f@Ueui^t)6Y@JC@>3je9ovX9kh zdn7F%^w>I{&nBPQF<22g|?QPQ3n0XN1@}m4hFR_drwR;-gQb zGVoH@fB%vAjEFsi-L?s7;&a-DzIT*;oyMNvy;<1Zv&Ol1?4jioJ7@{GdrfuCfvmb}-Js>w3FT{KEe-oDt*JV)-^NuFr_06>UbXpbug;nysihY6el54GEWF5!Wy-&x_xI-M2^QB5kUQ??T4e#rpn3 z@GtGEj^Q=rG|UF{wTxM=n$k$ysA7!&mFcr$ORPy{P(NWd5!uYKu`$kUj!jOV9L`Qp z#Z#M)V-q2?OnJ6*2b-rG)dl3`_WA#xBuc781BnKnP7R2*^ZE0$kgbt1H^t;{?O9xR zaWT!exVWG%A*i%J0^qm&9FKN1q?Cj+5oRZBB@_dMU-JL6KLRNKB~JW5)+O=(dr|5$ H Date: Thu, 5 Mar 2020 20:49:05 +0200 Subject: [PATCH 06/11] Double square `[[` brackets are a bash features. `==` is undefined in POSIX sh --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 223556eb8..635300c83 100644 --- a/install.sh +++ b/install.sh @@ -17,7 +17,7 @@ elif [ "$ID" = "centos" ] || [ "$ID" = "cloudlinux" ]; then 7|7.*) yum install curl wget -y 1> /dev/null yum update curl wget ca-certificates -y 1> /dev/null - if [[ "$ID" == "centos" ]] ; then + if [ "$ID" = "centos" ]; then SERVER_OS="CentOS" else SERVER_OS="CloudLinux" From 8e07f7ea1a37ea5c1bf2878073d5325ebbe0e12e Mon Sep 17 00:00:00 2001 From: Znuff Date: Thu, 5 Mar 2020 21:02:38 +0200 Subject: [PATCH 07/11] Proper domain validation with the "validators" library. --- requirments.txt | 3 ++- websiteFunctions/website.py | 23 ++++++++--------------- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/requirments.txt b/requirments.txt index 4b1b8bc45..619db9611 100755 --- a/requirments.txt +++ b/requirments.txt @@ -61,4 +61,5 @@ urllib3==1.22 websocket-client==0.56.0 zope.component==4.4.1 zope.event==4.3.0 -zope.interface==4.5.0 \ No newline at end of file +zope.interface==4.5.0 +validators==0.14.2 diff --git a/websiteFunctions/website.py b/websiteFunctions/website.py index d779ce7c3..b277e48cf 100755 --- a/websiteFunctions/website.py +++ b/websiteFunctions/website.py @@ -180,14 +180,12 @@ class WebsiteManager: return ACLManager.loadErrorJson('createWebSiteStatus', 0) - if not match(r'([\da-z\.-]+\.[a-z\.]{2,12}|[\d\.]+)([\/:?=&#]{1}[\da-z\.-]+)*[\/\?]?', domain, - M | I): + if not validators.domain(domain): data_ret = {'status': 0, 'createWebSiteStatus': 0, 'error_message': "Invalid domain."} json_data = json.dumps(data_ret) return HttpResponse(json_data) - if not match(r'\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b', adminEmail, - M | I): + if not validators.email(adminEmail): data_ret = {'status': 0, 'createWebSiteStatus': 0, 'error_message': "Invalid email."} json_data = json.dumps(data_ret) return HttpResponse(json_data) @@ -250,8 +248,7 @@ class WebsiteManager: path = data['path'] tempStatusPath = "/home/cyberpanel/" + str(randint(1000, 9999)) - if not match(r'([\da-z\.-]+\.[a-z\.]{2,12}|[\d\.]+)([\/:?=&#]{1}[\da-z\.-]+)*[\/\?]?', domain, - M | I): + if not validators.domain(domain): data_ret = {'status': 0, 'createWebSiteStatus': 0, 'error_message': "Invalid domain."} json_data = json.dumps(data_ret) return HttpResponse(json_data) @@ -1593,8 +1590,7 @@ class WebsiteManager: aliasDomain = data['aliasDomain'] ssl = data['ssl'] - if not match(r'([\da-z\.-]+\.[a-z\.]{2,12}|[\d\.]+)([\/:?=&#]{1}[\da-z\.-]+)*[\/\?]?', aliasDomain, - M | I): + if not validators.domain(aliasDomain): data_ret = {'status': 0, 'createAliasStatus': 0, 'error_message': "Invalid domain."} json_data = json.dumps(data_ret) return HttpResponse(json_data) @@ -2683,14 +2679,12 @@ StrictHostKeyChecking no self.domain = data['masterDomain'] - if not match(r'([\da-z\.-]+\.[a-z\.]{2,12}|[\d\.]+)([\/:?=&#]{1}[\da-z\.-]+)*[\/\?]?', self.domain, - M | I): + if not validators.domain(self.domain): data_ret = {'status': 0, 'createWebSiteStatus': 0, 'error_message': "Invalid domain."} json_data = json.dumps(data_ret) return HttpResponse(json_data) - if not match(r'([\da-z\.-]+\.[a-z\.]{2,12}|[\d\.]+)([\/:?=&#]{1}[\da-z\.-]+)*[\/\?]?', data['domainName'], - M | I): + if not validators.domain(data['domainName']): data_ret = {'status': 0, 'createWebSiteStatus': 0, 'error_message': "Invalid domain."} json_data = json.dumps(data_ret) return HttpResponse(json_data) @@ -2756,8 +2750,7 @@ StrictHostKeyChecking no currentACL = ACLManager.loadedACL(userID) admin = Administrator.objects.get(pk=userID) - if not match(r'([\da-z\.-]+\.[a-z\.]{2,12}|[\d\.]+)([\/:?=&#]{1}[\da-z\.-]+)*[\/\?]?', data['childDomain'], - M | I): + if not validators.domain(data['childDomain']): data_ret = {'status': 0, 'createWebSiteStatus': 0, 'error_message': "Invalid domain."} json_data = json.dumps(data_ret) return HttpResponse(json_data) @@ -2828,4 +2821,4 @@ StrictHostKeyChecking no except BaseException as msg: data_ret = {'status': 0, 'createWebSiteStatus': 0, 'error_message': str(msg)} json_data = json.dumps(data_ret) - return HttpResponse(json_data) \ No newline at end of file + return HttpResponse(json_data) From 0b08131cfcffc4e42d9a0c5ecc0bd1674b64b5bf Mon Sep 17 00:00:00 2001 From: qtwrk Date: Fri, 6 Mar 2020 17:36:04 +0100 Subject: [PATCH 08/11] update some link --- cyberpanel.sh | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/cyberpanel.sh b/cyberpanel.sh index 95a97e04c..d7bbb11f1 100644 --- a/cyberpanel.sh +++ b/cyberpanel.sh @@ -241,15 +241,15 @@ if [[ $SERVER_COUNTRY == "CN" ]] ; then #sed -i "${line2}i\ \ \ \ \ \ \ \ command = 'tar xzvf cyberpanel-git.tar.gz'" install.py #sed -i "${line2}i\ \ \ \ \ \ \ \ subprocess.call(command, shell=True)" install.py #sed -i "${line2}i\ \ \ \ \ \ \ \ command = 'wget cyberpanel.sh/cyberpanel-git.tar.gz'" install.py - sed -i 's|wget https://rpms.litespeedtech.com/debian/|wget --no-check-certificate https://rpms.litespeedtech.com/debian/|g' install.py + sed -i 's|wget http://rpms.litespeedtech.com/debian/|wget --no-check-certificate https://rpms.litespeedtech.com/debian/|g' install.py sed -i 's|https://repo.powerdns.com/repo-files/centos-auth-42.repo|https://'$DOWNLOAD_SERVER'/powerdns/powerdns.repo|g' installCyberPanel.py sed -i 's|https://www.rainloop.net/repository/webmail/rainloop-community-latest.zip|https://'$DOWNLOAD_SERVER'/misc/rainloop-community-latest.zip|g' install.py - sed -i 's|rpm -ivh https://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el7.noarch.rpm|curl -o /etc/yum.repos.d/litespeed.repo https://'$DOWNLOAD_SERVER'/litespeed/litespeed.repo|g' install.py + sed -i 's|rpm -ivh http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el7.noarch.rpm|curl -o /etc/yum.repos.d/litespeed.repo https://'$DOWNLOAD_SERVER'/litespeed/litespeed.repo|g' install.py sed -i 's|https://copr.fedorainfracloud.org/coprs/copart/restic/repo/epel-7/copart-restic-epel-7.repo|https://'$DOWNLOAD_SERVER'/restic/restic.repo|g' install.py sed -i 's|yum -y install https://cyberpanel.sh/gf-release-latest.gf.el7.noarch.rpm|wget -O /etc/yum.repos.d/gf.repo https://'$DOWNLOAD_SERVER'/gf-plus/gf.repo|g' install.py sed -i 's|dovecot-2.3-latest|dovecot-2.3-latest-mirror|g' install.py sed -i 's|git clone https://github.com/usmannasir/cyberpanel|wget https://cyberpanel.sh/cyberpanel-git.tar.gz \&\& tar xzvf cyberpanel-git.tar.gz|g' install.py - sed -i 's|https://repo.dovecot.org/ce-2.3-latest/centos/$releasever/RPMS/$basearch|https://'$DOWNLOAD_SERVER'/dovecot/|g' install.py + sed -i 's|http://repo.dovecot.org/ce-2.3-latest/centos/$releasever/RPMS/$basearch|https://'$DOWNLOAD_SERVER'/dovecot/|g' install.py sed -i 's|'$DOWNLOAD_SERVER'|cyberpanel.sh|g' install.py sed -i 's|https://www.litespeedtech.com/packages/5.0/lsws-5.4.2-ent-x86_64-linux.tar.gz|https://'$DOWNLOAD_SERVER'/litespeed/lsws-'$LSWS_STABLE_VER'-ent-x86_64-linux.tar.gz|g' installCyberPanel.py # global change for CN , regardless provider and system @@ -502,6 +502,15 @@ fi install_required() { +if [[ $SERVER_COUNTRY == "CN" ]] ; then + mkdir /root/.config + mkdir /root/.config/pip + cat << EOF > /root/.config/pip/pip.conf +[global] +index-url = https://mirrors.aliyun.com/pypi/simple/ +EOF +fi + echo -e "\nInstalling necessary components..." if [[ $SERVER_OS == "CentOS" ]] ; then timeout 10 rpm --import https://$DOWNLOAD_SERVER/mariadb/RPM-GPG-KEY-MariaDB @@ -1124,6 +1133,7 @@ fi if [[ $debug == "1" ]] ; then wget -O requirements.txt https://raw.githubusercontent.com/usmannasir/cyberpanel/$BRANCH_NAME/requirments.txt + check_return /usr/local/CyberPanel/bin/pip3 install --ignore-installed -r requirements.txt rm -f requirements.txt /usr/local/CyberPanel/bin/python install.py $SERVER_IP $SERIAL_NO $LICENSE_KEY --postfix $POSTFIX_VARIABLE --powerdns $POWERDNS_VARIABLE --ftp $PUREFTPD_VARIABLE @@ -1157,14 +1167,6 @@ export LC_ALL=en_US.UTF-8 #need to set lang to address some pip module installation issue. if [[ $DEV == "OFF" ]] ; then -if [[ $SERVER_COUNTRY == "CN" ]] ; then - mkdir /root/.config - mkdir /root/.config/pip - cat << EOF > /root/.config/pip/pip.conf -[global] -index-url = https://mirrors.aliyun.com/pypi/simple/ -EOF -fi if [[ $PROVIDER == "Alibaba Cloud" ]] ; then pip install --upgrade pip @@ -1181,6 +1183,7 @@ virtualenv --system-site-packages /usr/local/CyberPanel source /usr/local/CyberPanel/bin/activate rm -rf requirements.txt wget -O requirements.txt https://raw.githubusercontent.com/usmannasir/cyberpanel/1.8.0/requirments.txt +check_return pip install --ignore-installed -r requirements.txt check_return virtualenv --system-site-packages /usr/local/CyberPanel @@ -1193,6 +1196,7 @@ if [[ $DEV == "ON" ]] ; then virtualenv -p /usr/bin/python3 CyberPanel source /usr/local/CyberPanel/bin/activate wget -O requirements.txt https://raw.githubusercontent.com/usmannasir/cyberpanel/$BRANCH_NAME/requirments.txt + check_return pip3.6 install --ignore-installed -r requirements.txt check_return cd - @@ -1262,6 +1266,7 @@ EOF virtualenv -p /usr/bin/python3 /usr/local/CyberCP source /usr/local/CyberCP/bin/activate wget -O requirements.txt https://raw.githubusercontent.com/usmannasir/cyberpanel/$BRANCH_NAME/requirments.txt +check_return pip3.6 install --ignore-installed -r requirements.txt check_return systemctl restart lscpd From de0706edd190ff773f47f2438ba0ef43e29d6761 Mon Sep 17 00:00:00 2001 From: qtwrk Date: Sat, 7 Mar 2020 12:23:46 +0100 Subject: [PATCH 09/11] test for syncing --- test.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/test.sh b/test.sh index e69de29bb..9daeafb98 100644 --- a/test.sh +++ b/test.sh @@ -0,0 +1 @@ +test From 6e0ab32ea1aed01c7c08e5d70101e8f70dc4f33f Mon Sep 17 00:00:00 2001 From: qtwrk Date: Sat, 7 Mar 2020 16:38:21 +0100 Subject: [PATCH 10/11] test syncing --- test.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/test.sh b/test.sh index 9daeafb98..845f0a901 100644 --- a/test.sh +++ b/test.sh @@ -1 +1,2 @@ +test2 test From c7ff1af004d9045f58497f16b5ca100db92d9c36 Mon Sep 17 00:00:00 2001 From: qtwrk Date: Sat, 7 Mar 2020 16:59:22 +0100 Subject: [PATCH 11/11] test sync --- test.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/test.sh b/test.sh index 845f0a901..81a02b3cb 100644 --- a/test.sh +++ b/test.sh @@ -1,2 +1,3 @@ +test3 test2 test