From 0b08131cfcffc4e42d9a0c5ecc0bd1674b64b5bf Mon Sep 17 00:00:00 2001 From: qtwrk Date: Fri, 6 Mar 2020 17:36:04 +0100 Subject: [PATCH 1/2] 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 2/2] 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