From e24c8ac03ee65ae5482a4c8418b5f734ec96061f Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 10:46:59 +0800 Subject: [PATCH 001/196] Update install_dev.sh --- scripts/install_dev.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install_dev.sh b/scripts/install_dev.sh index 37462fa8b..3a0049449 100755 --- a/scripts/install_dev.sh +++ b/scripts/install_dev.sh @@ -44,6 +44,7 @@ elif grep -Eqi "AlmaLinux" /etc/issue || grep -Eq "AlmaLinux" /etc/*-release; th yum install -y wget zip unzip elif grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then OSNAME='debian' + apt update -y apt install -y devscripts apt install -y wget zip unzip elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then From f169ef6334df42fc5f4d59ed8a22401e93913c56 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 11:06:26 +0800 Subject: [PATCH 002/196] Update debian.sh --- scripts/install/debian.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install/debian.sh b/scripts/install/debian.sh index 426b9c0ac..9d51fdde4 100644 --- a/scripts/install/debian.sh +++ b/scripts/install/debian.sh @@ -87,7 +87,7 @@ echo -e "\e[0;32mfix zlib1g-dev install question end\e[0m" #fix libunwind-dev fail echo -e "\e[0;32mfix libunwind-dev install question start\e[0m" Install_TmpFile=/tmp/debian-fix-libunwind-dev.txt -apt install -y zlib1g-dev > ${Install_TmpFile} +apt install -y libunwind-dev > ${Install_TmpFile} if [ "$?" != "0" ];then liblzma5_BASE_VER=$(cat ${Install_TmpFile} | grep liblzma-dev | awk -F "=" '{print $2}' | awk -F ")" '{print $1}') liblzma5_BASE_VER=`echo ${liblzma5_BASE_VER} | sed "s/^[ \s]\{1,\}//g;s/[ \s]\{1,\}$//g"` From abf1eeef9b2325f55991b325b20b4f142d46f0c6 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 11:28:51 +0800 Subject: [PATCH 003/196] Update README.md --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2c908a929..a0dec4acc 100644 --- a/README.md +++ b/README.md @@ -122,11 +122,9 @@ curl -fsSL https://raw.githubusercontent.com/midoks/mdserver-web/dev/scripts/up [![Stargazers over time](https://starchart.cc/midoks/mdserver-web.svg)](https://starchart.cc/midoks/mdserver-web) -### 感谢 +### 感谢开发赞助 -- 开发赞助 - -[digitalvirt](https://digitalvirt.com/) +[![digitalvirt](https://digitalvirt.com/templates/BlueWhite/img/logo-dark.svg)](https://digitalvirt.com/) ### 授权许可 From 672a9af6202d65565fbb5f29520354720732212a Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 11:57:42 +0800 Subject: [PATCH 004/196] =?UTF-8?q?3306=E7=AB=AF=E5=8F=A3=E6=B3=A8?= =?UTF-8?q?=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/install/alma.sh | 4 ++-- scripts/install/centos.sh | 4 ++-- scripts/install/debian.sh | 4 ++-- scripts/install/fedora.sh | 4 ++-- scripts/install/rocky.sh | 4 ++-- scripts/install/ubuntu.sh | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/scripts/install/alma.sh b/scripts/install/alma.sh index da07497cf..87ed5dbae 100755 --- a/scripts/install/alma.sh +++ b/scripts/install/alma.sh @@ -26,7 +26,7 @@ if [ -f /etc/init.d/iptables ];then iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 888 -j ACCEPT iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 7200 -j ACCEPT - iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT + # iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT # iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 30000:40000 -j ACCEPT service iptables save @@ -50,7 +50,7 @@ if [ ! -f /etc/init.d/iptables ];then firewall-cmd --permanent --zone=public --add-port=443/tcp firewall-cmd --permanent --zone=public --add-port=888/tcp firewall-cmd --permanent --zone=public --add-port=7200/tcp - firewall-cmd --permanent --zone=public --add-port=3306/tcp + # firewall-cmd --permanent --zone=public --add-port=3306/tcp # firewall-cmd --permanent --zone=public --add-port=30000-40000/tcp diff --git a/scripts/install/centos.sh b/scripts/install/centos.sh index 99fec794a..b93800cf1 100755 --- a/scripts/install/centos.sh +++ b/scripts/install/centos.sh @@ -30,7 +30,7 @@ if [ -f /etc/init.d/iptables ];then iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 888 -j ACCEPT iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 7200 -j ACCEPT - iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT + # iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT # iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 30000:40000 -j ACCEPT service iptables save @@ -54,7 +54,7 @@ if [ ! -f /etc/init.d/iptables ];then firewall-cmd --permanent --zone=public --add-port=443/tcp firewall-cmd --permanent --zone=public --add-port=888/tcp firewall-cmd --permanent --zone=public --add-port=7200/tcp - firewall-cmd --permanent --zone=public --add-port=3306/tcp + # firewall-cmd --permanent --zone=public --add-port=3306/tcp # firewall-cmd --permanent --zone=public --add-port=30000-40000/tcp diff --git a/scripts/install/debian.sh b/scripts/install/debian.sh index 9d51fdde4..6a437af46 100644 --- a/scripts/install/debian.sh +++ b/scripts/install/debian.sh @@ -33,7 +33,7 @@ if [ -f /usr/sbin/ufw ];then ufw allow 443/tcp ufw allow 888/tcp ufw allow 7200/tcp - ufw allow 3306/tcp + # ufw allow 3306/tcp # ufw allow 30000:40000/tcp fi @@ -55,7 +55,7 @@ if [ ! -f /usr/sbin/ufw ];then firewall-cmd --permanent --zone=public --add-port=443/tcp firewall-cmd --permanent --zone=public --add-port=888/tcp firewall-cmd --permanent --zone=public --add-port=7200/tcp - firewall-cmd --permanent --zone=public --add-port=3306/tcp + # firewall-cmd --permanent --zone=public --add-port=3306/tcp # firewall-cmd --permanent --zone=public --add-port=30000-40000/tcp # fix:debian10 firewalld faq diff --git a/scripts/install/fedora.sh b/scripts/install/fedora.sh index 9074e7eef..2eec600ce 100644 --- a/scripts/install/fedora.sh +++ b/scripts/install/fedora.sh @@ -29,7 +29,7 @@ if [ -f /etc/init.d/iptables ];then iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 888 -j ACCEPT iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 7200 -j ACCEPT - iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT + # iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT # iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 30000:40000 -j ACCEPT service iptables save @@ -55,7 +55,7 @@ if [ "${isVersion}" == '' ];then firewall-cmd --permanent --zone=public --add-port=443/tcp firewall-cmd --permanent --zone=public --add-port=888/tcp firewall-cmd --permanent --zone=public --add-port=7200/tcp - firewall-cmd --permanent --zone=public --add-port=3306/tcp + # firewall-cmd --permanent --zone=public --add-port=3306/tcp # firewall-cmd --permanent --zone=public --add-port=30000-40000/tcp firewall-cmd --reload fi diff --git a/scripts/install/rocky.sh b/scripts/install/rocky.sh index b4621abeb..557919b60 100644 --- a/scripts/install/rocky.sh +++ b/scripts/install/rocky.sh @@ -31,7 +31,7 @@ if [ -f /etc/init.d/iptables ];then iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 888 -j ACCEPT iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 7200 -j ACCEPT - iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT + # iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT # iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 30000:40000 -j ACCEPT service iptables save @@ -55,7 +55,7 @@ if [ ! -f /etc/init.d/iptables ];then firewall-cmd --permanent --zone=public --add-port=443/tcp firewall-cmd --permanent --zone=public --add-port=888/tcp firewall-cmd --permanent --zone=public --add-port=7200/tcp - firewall-cmd --permanent --zone=public --add-port=3306/tcp + # firewall-cmd --permanent --zone=public --add-port=3306/tcp # firewall-cmd --permanent --zone=public --add-port=30000-40000/tcp diff --git a/scripts/install/ubuntu.sh b/scripts/install/ubuntu.sh index adf835437..476a63de2 100644 --- a/scripts/install/ubuntu.sh +++ b/scripts/install/ubuntu.sh @@ -26,7 +26,7 @@ if [ -f /usr/sbin/ufw ];then ufw allow 443/tcp ufw allow 888/tcp ufw allow 7200/tcp - ufw allow 3306/tcp + # ufw allow 3306/tcp # ufw allow 30000:40000/tcp fi @@ -46,7 +46,7 @@ if [ ! -f /usr/sbin/ufw ];then firewall-cmd --permanent --zone=public --add-port=443/tcp firewall-cmd --permanent --zone=public --add-port=888/tcp firewall-cmd --permanent --zone=public --add-port=7200/tcp - firewall-cmd --permanent --zone=public --add-port=3306/tcp + # firewall-cmd --permanent --zone=public --add-port=3306/tcp # firewall-cmd --permanent --zone=public --add-port=30000-40000/tcp # fix:debian10 firewalld faq From df7a9ce44635fe7f3a69f8ccdc1b1ff8342d2322 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 11:57:49 +0800 Subject: [PATCH 005/196] Update mw.tpl --- scripts/init.d/mw.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/init.d/mw.tpl b/scripts/init.d/mw.tpl index 4eacd0304..e60ba4095 100755 --- a/scripts/init.d/mw.tpl +++ b/scripts/init.d/mw.tpl @@ -221,7 +221,7 @@ case "$1" in echo -e "password: $password" echo -e "\033[33mWarning:\033[0m" echo -e "\033[33mIf you cannot access the panel, \033[0m" - echo -e "\033[33mrelease the following port (7200|888|80|443|20|21) in the security group\033[0m" + echo -e "\033[33mrelease the following port (7200|888|80|443|22) in the security group\033[0m" echo -e "==================================================================" ;; esac From fa86fbefdb680d4dd2c1ceac71b06f945f16f41a Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 11:58:47 +0800 Subject: [PATCH 006/196] Update default.sql --- data/sql/default.sql | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/data/sql/default.sql b/data/sql/default.sql index ab168862e..158206c9d 100755 --- a/data/sql/default.sql +++ b/data/sql/default.sql @@ -48,8 +48,7 @@ INSERT INTO `firewall` (`id`, `port`, `ps`, `addtime`) VALUES (1, '80', '网站默认端口', '0000-00-00 00:00:00'), (2, '7200', 'WEB面板', '0000-00-00 00:00:00'), (3, '22', 'SSH远程管理服务', '0000-00-00 00:00:00'), -(4, '888', 'phpMyAdmin默认端口', '0000-00-00 00:00:00'), -(5, '3306', 'MySQL端口', '0000-00-00 00:00:00'); +(4, '888', 'phpMyAdmin默认端口', '0000-00-00 00:00:00'); From 83c2aedf1ac744272d62f2c804bcdd8f5922330a Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 12:02:11 +0800 Subject: [PATCH 007/196] Update install.sh --- plugins/php/versions/53/install.sh | 9 --------- 1 file changed, 9 deletions(-) diff --git a/plugins/php/versions/53/install.sh b/plugins/php/versions/53/install.sh index dc424ac7f..1f0cb2beb 100755 --- a/plugins/php/versions/53/install.sh +++ b/plugins/php/versions/53/install.sh @@ -34,15 +34,6 @@ if [ ! -d $sourcePath/php/php${PHP_VER} ];then fi -if [ -f $serverPath/php/53/bin/php.dSYM ];then - mv $serverPath/php/53/bin/php.dSYM $serverPath/php/53/bin/php -fi - -if [ -f $serverPath/php/53/sbin/php-fpm.dSYM ];then - mv $serverPath/php/53/sbin/php-fpm.dSYM $serverPath/php/53/sbin/php-fpm -fi - - if [ -f $serverPath/php/53/bin/php ];then return fi From 811be6fa711c6cb33a5456d119e8555d4fea9159 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 12:50:37 +0800 Subject: [PATCH 008/196] up --- plugins/php/versions/53/install.sh | 1 + scripts/install.sh | 3 +++ scripts/install_cn.sh | 3 +++ 3 files changed, 7 insertions(+) diff --git a/plugins/php/versions/53/install.sh b/plugins/php/versions/53/install.sh index 1f0cb2beb..e41edd4ed 100755 --- a/plugins/php/versions/53/install.sh +++ b/plugins/php/versions/53/install.sh @@ -11,6 +11,7 @@ sysName=`uname` install_tmp=${rootPath}/tmp/mw_install.pl + version=5.3.29 PHP_VER=53 Install_php() diff --git a/scripts/install.sh b/scripts/install.sh index c2de403f3..f7de91cea 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -44,6 +44,9 @@ elif grep -Eqi "AlmaLinux" /etc/issue || grep -Eq "AlmaLinux" /etc/*-release; th yum install -y wget zip unzip elif grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then OSNAME='debian' + apt update -y + apt install -y devscripts + apt install -y wget zip unzip apt install -y wget zip unzip elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then OSNAME='ubuntu' diff --git a/scripts/install_cn.sh b/scripts/install_cn.sh index 15e878001..990c862d7 100755 --- a/scripts/install_cn.sh +++ b/scripts/install_cn.sh @@ -44,6 +44,9 @@ elif grep -Eqi "AlmaLinux" /etc/issue || grep -Eq "AlmaLinux" /etc/*-release; th yum install -y wget zip unzip elif grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then OSNAME='debian' + apt update -y + apt install -y devscripts + apt install -y wget zip unzip apt install -y wget zip unzip elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then OSNAME='ubuntu' From 164d20b609352c91aa4df39b25c97677669abe2d Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 12:55:57 +0800 Subject: [PATCH 009/196] Update mw.tpl --- scripts/init.d/mw.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/init.d/mw.tpl b/scripts/init.d/mw.tpl index e60ba4095..ed08ee0f9 100755 --- a/scripts/init.d/mw.tpl +++ b/scripts/init.d/mw.tpl @@ -175,7 +175,7 @@ case "$1" in if [ ! -f $mw_path/data/default.pl ];then echo -e "\033[33mInstall Failed\033[0m" - exit 0 + exit 1 fi password=$(cat $mw_path/data/default.pl) From d66b144ccb854a72ab792210be6171032cc2c52b Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 13:07:44 +0800 Subject: [PATCH 010/196] =?UTF-8?q?debian=20php52=E6=9A=82=E4=B8=8D?= =?UTF-8?q?=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index a0dec4acc..a11a7da8c 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,6 @@ systemd 支持 CentOS,Ubuntu,Debian,Fedora... ### 问题 - Ubuntu 20 无法安装mysql5.7 && mysql 80. - Ftp debian无法安装成功。 -- php52,在debian无法安装成功。 ### GW使用 From bb2849467dbf11e211c02fbd67233aeb843c81da Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 13:23:53 +0800 Subject: [PATCH 011/196] =?UTF-8?q?=E9=80=9A=E7=94=A8=E5=BF=AB=E6=8D=B7?= =?UTF-8?q?=E5=AE=89=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 8 ++++++++ scripts/quick/app.sh | 30 ++++++++++++++++++++++++++++++ scripts/quick/debug.sh | 30 ++++++++++++++++++++++++++++++ 3 files changed, 68 insertions(+) create mode 100755 scripts/quick/app.sh create mode 100755 scripts/quick/debug.sh diff --git a/README.md b/README.md index a11a7da8c..d28c3a909 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,14 @@ curl -fsSL https://gitee.com/midoks/mdserver-web/raw/master/scripts/update_cn.s ``` + +### 通用安装 + +``` +curl -fsSL https://raw.githubusercontent.com/midoks/mdserver-web/master/scripts/quick/app.sh | bash +``` + + ### DEV使用 - 自动安装 diff --git a/scripts/quick/app.sh b/scripts/quick/app.sh new file mode 100755 index 000000000..162d9e7b7 --- /dev/null +++ b/scripts/quick/app.sh @@ -0,0 +1,30 @@ +#!/bin/bash +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin +export PATH + +echo "welcome to mdserver-web panel" + +startTime=`date +%s` + +if [ ! -f /www/server/mdserver-web ];then + echo "mdserver-web not exist!" + exit 1 +fi + +# openresty +cd /www/server/mdserver-web/plugins/openresty && bash install.sh 1.21.4.1 +cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/openresty/index.py start + +# php +cd /www/server/mdserver-web/plugins/php && bash install.sh 71 +cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/php/index.py start + +# mysql +cd /www/server/mdserver-web/plugins/mysql && bash install.sh 5.5 +cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/mysql/index.py start 5.5 + + +endTime=`date +%s` +((outTime=(${endTime}-${startTime})/60)) +echo -e "Time consumed:\033[32m $outTime \033[0mMinute!" + diff --git a/scripts/quick/debug.sh b/scripts/quick/debug.sh new file mode 100755 index 000000000..162d9e7b7 --- /dev/null +++ b/scripts/quick/debug.sh @@ -0,0 +1,30 @@ +#!/bin/bash +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin +export PATH + +echo "welcome to mdserver-web panel" + +startTime=`date +%s` + +if [ ! -f /www/server/mdserver-web ];then + echo "mdserver-web not exist!" + exit 1 +fi + +# openresty +cd /www/server/mdserver-web/plugins/openresty && bash install.sh 1.21.4.1 +cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/openresty/index.py start + +# php +cd /www/server/mdserver-web/plugins/php && bash install.sh 71 +cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/php/index.py start + +# mysql +cd /www/server/mdserver-web/plugins/mysql && bash install.sh 5.5 +cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/mysql/index.py start 5.5 + + +endTime=`date +%s` +((outTime=(${endTime}-${startTime})/60)) +echo -e "Time consumed:\033[32m $outTime \033[0mMinute!" + From e165deecd0db48dcba5ffd962ed462ffc4f9d149 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 13:25:43 +0800 Subject: [PATCH 012/196] Update debian.sh --- scripts/update/debian.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/update/debian.sh b/scripts/update/debian.sh index 1e2d8156c..5029b36ca 100644 --- a/scripts/update/debian.sh +++ b/scripts/update/debian.sh @@ -21,7 +21,6 @@ fi pip install --upgrade pip pip install --upgrade setuptools -sed -i "/mysqlclient/d" /www/server/mdserver-web/requirements.txt cd /www/server/mdserver-web && pip3 install -r /www/server/mdserver-web/requirements.txt pip3 install gunicorn==20.1.0 From ab13fead5c38abf35cef402981fd4e798f0df69c Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 13:30:59 +0800 Subject: [PATCH 013/196] Update app.sh --- scripts/quick/app.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/quick/app.sh b/scripts/quick/app.sh index 162d9e7b7..29eeac9dd 100755 --- a/scripts/quick/app.sh +++ b/scripts/quick/app.sh @@ -6,7 +6,7 @@ echo "welcome to mdserver-web panel" startTime=`date +%s` -if [ ! -f /www/server/mdserver-web ];then +if [ ! -d /www/server/mdserver-web ];then echo "mdserver-web not exist!" exit 1 fi From 82dd6f32bcebefa010242c3252aa065c092077c1 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 13:32:59 +0800 Subject: [PATCH 014/196] Update app.sh --- scripts/quick/app.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/quick/app.sh b/scripts/quick/app.sh index 29eeac9dd..722df5126 100755 --- a/scripts/quick/app.sh +++ b/scripts/quick/app.sh @@ -17,7 +17,7 @@ cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/openrest # php cd /www/server/mdserver-web/plugins/php && bash install.sh 71 -cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/php/index.py start +cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/php/index.py start 71 # mysql cd /www/server/mdserver-web/plugins/mysql && bash install.sh 5.5 From 4a356e9bbe032e72331bb7c74f89a20911d8c00b Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 13:38:28 +0800 Subject: [PATCH 015/196] Update app.sh --- scripts/quick/app.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/quick/app.sh b/scripts/quick/app.sh index 722df5126..a51ed973a 100755 --- a/scripts/quick/app.sh +++ b/scripts/quick/app.sh @@ -12,15 +12,17 @@ if [ ! -d /www/server/mdserver-web ];then fi # openresty -cd /www/server/mdserver-web/plugins/openresty && bash install.sh 1.21.4.1 +cd /www/server/mdserver-web/plugins/openresty && bash install.sh install 1.21.4.1 cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/openresty/index.py start + + # php -cd /www/server/mdserver-web/plugins/php && bash install.sh 71 +cd /www/server/mdserver-web/plugins/php && bash install.sh install 71 cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/php/index.py start 71 # mysql -cd /www/server/mdserver-web/plugins/mysql && bash install.sh 5.5 +cd /www/server/mdserver-web/plugins/mysql && bash install.sh install 5.5 cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/mysql/index.py start 5.5 From b2007d3d9abf4434a36b6a02077455b52a649fb8 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 13:42:31 +0800 Subject: [PATCH 016/196] Update install.sh --- plugins/openresty/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/openresty/install.sh b/plugins/openresty/install.sh index 92954192e..627e70cfb 100755 --- a/plugins/openresty/install.sh +++ b/plugins/openresty/install.sh @@ -45,7 +45,7 @@ Install_openresty() --with-http_slice_module \ --with-http_stub_status_module - gmake && gmake install && make clean + make && make install && make clean if [ -d $serverPath/openresty ];then echo "${VERSION}" > $serverPath/openresty/version.pl From 9785e64a63c8f7b18f3dd3add87819667dbb1463 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 14:28:12 +0800 Subject: [PATCH 017/196] Update app.sh --- scripts/quick/app.sh | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/scripts/quick/app.sh b/scripts/quick/app.sh index a51ed973a..473a323d1 100755 --- a/scripts/quick/app.sh +++ b/scripts/quick/app.sh @@ -12,19 +12,23 @@ if [ ! -d /www/server/mdserver-web ];then fi # openresty -cd /www/server/mdserver-web/plugins/openresty && bash install.sh install 1.21.4.1 -cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/openresty/index.py start - +if [ ! -d /www/server/openresty ];then + cd /www/server/mdserver-web/plugins/openresty && bash install.sh install 1.21.4.1 + cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/openresty/index.py start +fi # php -cd /www/server/mdserver-web/plugins/php && bash install.sh install 71 -cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/php/index.py start 71 +if [ ! -d /www/server/php/71 ];then + cd /www/server/mdserver-web/plugins/php && bash install.sh install 71 + cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/php/index.py start 71 +fi # mysql -cd /www/server/mdserver-web/plugins/mysql && bash install.sh install 5.5 -cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/mysql/index.py start 5.5 - +if [ ! -d /www/server/mysql ];then + cd /www/server/mdserver-web/plugins/mysql && bash install.sh install 5.5 + cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/mysql/index.py start 5.5 +fi endTime=`date +%s` ((outTime=(${endTime}-${startTime})/60)) From 6899297213c2567bc27f2671b747423500d173f8 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 14:28:31 +0800 Subject: [PATCH 018/196] Update debug.sh --- scripts/quick/debug.sh | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/scripts/quick/debug.sh b/scripts/quick/debug.sh index 162d9e7b7..473a323d1 100755 --- a/scripts/quick/debug.sh +++ b/scripts/quick/debug.sh @@ -6,23 +6,29 @@ echo "welcome to mdserver-web panel" startTime=`date +%s` -if [ ! -f /www/server/mdserver-web ];then +if [ ! -d /www/server/mdserver-web ];then echo "mdserver-web not exist!" exit 1 fi # openresty -cd /www/server/mdserver-web/plugins/openresty && bash install.sh 1.21.4.1 -cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/openresty/index.py start +if [ ! -d /www/server/openresty ];then + cd /www/server/mdserver-web/plugins/openresty && bash install.sh install 1.21.4.1 + cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/openresty/index.py start +fi + # php -cd /www/server/mdserver-web/plugins/php && bash install.sh 71 -cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/php/index.py start +if [ ! -d /www/server/php/71 ];then + cd /www/server/mdserver-web/plugins/php && bash install.sh install 71 + cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/php/index.py start 71 +fi # mysql -cd /www/server/mdserver-web/plugins/mysql && bash install.sh 5.5 -cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/mysql/index.py start 5.5 - +if [ ! -d /www/server/mysql ];then + cd /www/server/mdserver-web/plugins/mysql && bash install.sh install 5.5 + cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/mysql/index.py start 5.5 +fi endTime=`date +%s` ((outTime=(${endTime}-${startTime})/60)) From ece3bd90394fe846d5a9987dc88ff141e40d8f07 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 14:32:30 +0800 Subject: [PATCH 019/196] Update app.sh --- scripts/quick/app.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/quick/app.sh b/scripts/quick/app.sh index 473a323d1..f411bab40 100755 --- a/scripts/quick/app.sh +++ b/scripts/quick/app.sh @@ -15,6 +15,8 @@ fi if [ ! -d /www/server/openresty ];then cd /www/server/mdserver-web/plugins/openresty && bash install.sh install 1.21.4.1 cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/openresty/index.py start +else + echo "openresty alreay exist!" fi @@ -22,12 +24,16 @@ fi if [ ! -d /www/server/php/71 ];then cd /www/server/mdserver-web/plugins/php && bash install.sh install 71 cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/php/index.py start 71 +else + echo "php71 alreay exist!" fi # mysql if [ ! -d /www/server/mysql ];then cd /www/server/mdserver-web/plugins/mysql && bash install.sh install 5.5 cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/mysql/index.py start 5.5 +else + echo "mysql alreay exist!" fi endTime=`date +%s` From e3bfa9d3f11631e578ee2327424432a5dc591b94 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 15:33:29 +0800 Subject: [PATCH 020/196] Update debug.sh --- scripts/quick/debug.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/quick/debug.sh b/scripts/quick/debug.sh index 473a323d1..f4b4aa379 100755 --- a/scripts/quick/debug.sh +++ b/scripts/quick/debug.sh @@ -26,8 +26,8 @@ fi # mysql if [ ! -d /www/server/mysql ];then - cd /www/server/mdserver-web/plugins/mysql && bash install.sh install 5.5 - cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/mysql/index.py start 5.5 + cd /www/server/mdserver-web/plugins/mysql && bash install.sh install 8.0 + cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/mysql/index.py start 8.0 fi endTime=`date +%s` From 300bcfc2efbb3052716c35d5e031f1562f53750d Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 17:07:09 +0800 Subject: [PATCH 021/196] =?UTF-8?q?init.d=20to=20systemd=20=E5=9F=BA?= =?UTF-8?q?=E6=9C=AC=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 9 --------- 1 file changed, 9 deletions(-) diff --git a/README.md b/README.md index d28c3a909..2e7b77158 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,6 @@ 简单的Linux面板,感谢BT.CN写出如此好的web管理软件。我一看到,就知道这是我一直想要的页面化管理方式。 复制了后台管理界面,按照自己想要的方式写了一版。 -``` -为了兼容CentOS,Ubuntu,Debian,Fedora, 由chkconfig改systemd管理。原来都要重新安装。还在进行修改.. - -chkconfig 支持 Fedora,CentOS -update-rc.d 支持 Ubuntu,Debian | 功能不够 -systemd 支持 CentOS,Ubuntu,Debian,Fedora... - -``` ![CentOS](https://img.shields.io/badge/LINUX-CentOS-blue?style=for-the-badge&logo=CentOS) ![Ubuntu](https://img.shields.io/badge/LINUX-Ubuntu-blue?style=for-the-badge&logo=Ubuntu) @@ -22,7 +14,6 @@ systemd 支持 CentOS,Ubuntu,Debian,Fedora... * 面板收藏功能 * 网站子目录绑定 * 网站备份功能 -* 自动更新优化 * 插件方式管理 基本上可以使用,后续会继续优化!欢迎提供意见! From 1df2e277cbf1c6b4535b4b1152f5f67842a84c8d Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 17:07:14 +0800 Subject: [PATCH 022/196] Update .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index aae13447a..14c7aa91a 100644 --- a/.gitignore +++ b/.gitignore @@ -130,3 +130,4 @@ include data/api_login.txt data/sessions data/ssl.pl +data/port.pl From c56a61afe0fc23387f901476243bd12f66899c3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AF=B9=E6=9C=9B?= <58730447+DuCun@users.noreply.github.com> Date: Thu, 23 Jun 2022 18:20:13 +0800 Subject: [PATCH 023/196] Displaying HTTPS Ports --- data/sql/default.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/data/sql/default.sql b/data/sql/default.sql index 158206c9d..20b85b5dc 100755 --- a/data/sql/default.sql +++ b/data/sql/default.sql @@ -48,7 +48,8 @@ INSERT INTO `firewall` (`id`, `port`, `ps`, `addtime`) VALUES (1, '80', '网站默认端口', '0000-00-00 00:00:00'), (2, '7200', 'WEB面板', '0000-00-00 00:00:00'), (3, '22', 'SSH远程管理服务', '0000-00-00 00:00:00'), -(4, '888', 'phpMyAdmin默认端口', '0000-00-00 00:00:00'); +(4, '888', 'phpMyAdmin默认端口', '0000-00-00 00:00:00'), +(5, '443', 'HTTPS', '0000-00-00 00:00:00'); From 73378d4565050790098ec2e5c0a81198827214b9 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 18:40:03 +0800 Subject: [PATCH 024/196] =?UTF-8?q?task=E6=98=BE=E7=A4=BA=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- class/core/task_api.py | 2 ++ route/static/app/public.js | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/class/core/task_api.py b/class/core/task_api.py index 728e08fba..53b8023a1 100755 --- a/class/core/task_api.py +++ b/class/core/task_api.py @@ -42,6 +42,8 @@ class task_api: _page['tojs'] = 'remind' _page['p'] = p + # return data + _ret['count'] = count _ret['page'] = mw.getPage(_page) return mw.getJson(_ret) diff --git a/route/static/app/public.js b/route/static/app/public.js index 462b642a7..4c1428d05 100755 --- a/route/static/app/public.js +++ b/route/static/app/public.js @@ -1088,15 +1088,17 @@ function execLog(){ function remind(a){ a = a == undefined ? 1 : a; $.post("/task/list", "table=tasks&result=2,4,6,8&limit=10&p=" + a, function(g) { + // console.log(g); var e = ""; var f = false; var task_count = 0; for(var d = 0; d < g.data.length; d++) { if(g.data[d].status != '1'){ task_count++; - continue; + e += '
'+g.data[d].name+'【'+lan.bt.task_the+'】'+ lan.bt.time + (g.data[d].end - g.data[d].start) + lan.bt.s+'
'+g.data[d].addtime+'' + } else{ + e += '
'+g.data[d].name+'【'+lan.bt.task_ok+'】'+ lan.bt.time + (g.data[d].end - g.data[d].start) + lan.bt.s+'
'+g.data[d].addtime+''; } - e += '
'+g.data[d].name+'【'+lan.bt.task_ok+'】'+ lan.bt.time + (g.data[d].end - g.data[d].start) + lan.bt.s+'
'+g.data[d].addtime+'' } var con = '
\ \ @@ -1112,7 +1114,7 @@ function remind(a){ '; $(".task_count").text(task_count); - $(".msg_count").text(g.data.length); + $(".msg_count").text(g.count); $(".taskcon").html(con); $("#taskPage").html(g.page); From fa0d5b552106d1aed5bb0b80e4ff9f0fe327fdb7 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 19:51:58 +0800 Subject: [PATCH 025/196] Update install.sh --- plugins/mysql/versions/8.0/install.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/mysql/versions/8.0/install.sh b/plugins/mysql/versions/8.0/install.sh index 2a7f63615..303fefa19 100755 --- a/plugins/mysql/versions/8.0/install.sh +++ b/plugins/mysql/versions/8.0/install.sh @@ -58,7 +58,10 @@ Install_mysql() -DFORCE_INSOURCE_BUILD=1 \ -DWITH_BOOST=${mysqlDir}/mysql-8.0.25/boost/ make && make install && make clean - echo '8.0' > $serverPath/mysql/version.pl + + if [ -d $serverPath/mysql ];then + echo '8.0' > $serverPath/mysql/version.pl + fi echo '安装完成' > $install_tmp fi } From 4e90620132ae6732e6ba4ebabeedf4c6b079900c Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 21:25:39 +0800 Subject: [PATCH 026/196] =?UTF-8?q?=E4=BF=AE=E6=94=B9mysql=E5=AF=BC?= =?UTF-8?q?=E5=87=BAtmp=E6=96=87=E4=BB=B6=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/mysql/conf/my.cnf | 2 +- plugins/mysql/conf/my5.7.cnf | 2 +- plugins/mysql/conf/my8.0.cnf | 2 +- plugins/mysql/index.py | 4 ++++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/plugins/mysql/conf/my.cnf b/plugins/mysql/conf/my.cnf index 26cf2e994..c51593d2f 100644 --- a/plugins/mysql/conf/my.cnf +++ b/plugins/mysql/conf/my.cnf @@ -80,7 +80,7 @@ innodb_write_io_threads = 1 innodb_file_per_table=1 -secure-file-priv=/tmp +secure-file-priv={$SERVER_APP_PATH}/tmp [mysqldump] quick diff --git a/plugins/mysql/conf/my5.7.cnf b/plugins/mysql/conf/my5.7.cnf index b1ceb4ecb..02d4b649d 100644 --- a/plugins/mysql/conf/my5.7.cnf +++ b/plugins/mysql/conf/my5.7.cnf @@ -76,7 +76,7 @@ innodb_read_io_threads = 1 innodb_write_io_threads = 1 innodb_file_per_table=1 -secure-file-priv=/tmp +secure-file-priv={$SERVER_APP_PATH}/tmp [mysqldump] quick diff --git a/plugins/mysql/conf/my8.0.cnf b/plugins/mysql/conf/my8.0.cnf index 453ee1173..e4acaf3db 100644 --- a/plugins/mysql/conf/my8.0.cnf +++ b/plugins/mysql/conf/my8.0.cnf @@ -77,7 +77,7 @@ innodb_write_io_threads = 1 innodb_file_per_table=1 binlog_expire_logs_seconds=2592000 -secure-file-priv=/tmp +secure-file-priv={$SERVER_APP_PATH}/tmp [mysqldump] quick diff --git a/plugins/mysql/index.py b/plugins/mysql/index.py index 1d624817c..557616a5b 100755 --- a/plugins/mysql/index.py +++ b/plugins/mysql/index.py @@ -161,6 +161,10 @@ def initDreplace(version=''): if not os.path.exists(mysql_conf_dir): os.mkdir(mysql_conf_dir) + mysql_tmp = getServerDir() + '/tmp' + if not os.path.exists(mysql_tmp): + os.mkdir(mysql_tmp) + mysql_conf = mysql_conf_dir + '/my.cnf' if not os.path.exists(mysql_conf): mysql_conf_tpl = getPluginDir() + '/conf/my' + version + '.cnf' From f68d42fa1f7b808963caff7906e1a42c4d57ba13 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 21:27:11 +0800 Subject: [PATCH 027/196] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E7=BC=96=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/mysql/versions/5.5/install.sh | 4 ++-- plugins/mysql/versions/5.6/install.sh | 4 ++-- plugins/mysql/versions/5.7/install.sh | 4 ++-- plugins/mysql/versions/8.0/install.sh | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/mysql/versions/5.5/install.sh b/plugins/mysql/versions/5.5/install.sh index 81f4d2271..526931550 100755 --- a/plugins/mysql/versions/5.5/install.sh +++ b/plugins/mysql/versions/5.5/install.sh @@ -47,8 +47,8 @@ Install_mysql() -DENABLED_LOCAL_INFILE=1 \ -DWITH_PARTITION_STORAGE_ENGINE=1 \ -DEXTRA_CHARSETS=all \ - -DDEFAULT_CHARSET=utf8 \ - -DDEFAULT_COLLATION=utf8_general_ci \ + -DDEFAULT_CHARSET=utf8mb4 \ + -DDEFAULT_COLLATION=utf8mb4_general_ci \ && make && make install && make clean \ && echo '5.5' > $serverPath/mysql/version.pl echo '安装完成' > $install_tmp diff --git a/plugins/mysql/versions/5.6/install.sh b/plugins/mysql/versions/5.6/install.sh index e8c79bff4..11eb87293 100755 --- a/plugins/mysql/versions/5.6/install.sh +++ b/plugins/mysql/versions/5.6/install.sh @@ -51,8 +51,8 @@ Install_mysql() -DENABLED_LOCAL_INFILE=1 \ -DWITH_PARTITION_STORAGE_ENGINE=1 \ -DEXTRA_CHARSETS=all \ - -DDEFAULT_CHARSET=utf8 \ - -DDEFAULT_COLLATION=utf8_general_ci \ + -DDEFAULT_CHARSET=utf8mb4 \ + -DDEFAULT_COLLATION=utf8mb4_general_ci \ && make && make install && make clean echo '5.6' > $serverPath/mysql/version.pl echo '安装完成' > $install_tmp diff --git a/plugins/mysql/versions/5.7/install.sh b/plugins/mysql/versions/5.7/install.sh index 5efccde0c..6d71a078e 100755 --- a/plugins/mysql/versions/5.7/install.sh +++ b/plugins/mysql/versions/5.7/install.sh @@ -51,8 +51,8 @@ Install_mysql() -DENABLED_LOCAL_INFILE=1 \ -DWITH_PARTITION_STORAGE_ENGINE=1 \ -DEXTRA_CHARSETS=all \ - -DDEFAULT_CHARSET=utf8 \ - -DDEFAULT_COLLATION=utf8_general_ci \ + -DDEFAULT_CHARSET=utf8mb4 \ + -DDEFAULT_COLLATION=utf8mb4_general_ci \ -DDOWNLOAD_BOOST=1 \ -DWITH_BOOST=${mysqlDir}/mysql-${VERSION}/boost/ make && make install && make clean diff --git a/plugins/mysql/versions/8.0/install.sh b/plugins/mysql/versions/8.0/install.sh index 303fefa19..4e3fb709a 100755 --- a/plugins/mysql/versions/8.0/install.sh +++ b/plugins/mysql/versions/8.0/install.sh @@ -52,8 +52,8 @@ Install_mysql() -DENABLED_LOCAL_INFILE=1 \ -DWITH_PARTITION_STORAGE_ENGINE=1 \ -DEXTRA_CHARSETS=all \ - -DDEFAULT_CHARSET=utf8 \ - -DDEFAULT_COLLATION=utf8_general_ci \ + -DDEFAULT_CHARSET=utf8mb4 \ + -DDEFAULT_COLLATION=utf8mb4_general_ci \ -DDOWNLOAD_BOOST=1 \ -DFORCE_INSOURCE_BUILD=1 \ -DWITH_BOOST=${mysqlDir}/mysql-8.0.25/boost/ From 53b9cdf124cc2af8ed172d0a6411b6508e15b8db Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 22:29:33 +0800 Subject: [PATCH 028/196] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/mysql/index.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/mysql/index.py b/plugins/mysql/index.py index 557616a5b..f0971a70d 100755 --- a/plugins/mysql/index.py +++ b/plugins/mysql/index.py @@ -164,6 +164,7 @@ def initDreplace(version=''): mysql_tmp = getServerDir() + '/tmp' if not os.path.exists(mysql_tmp): os.mkdir(mysql_tmp) + mw.execShell("chown mysql:mysql " + mysql_tmp) mysql_conf = mysql_conf_dir + '/my.cnf' if not os.path.exists(mysql_conf): @@ -485,9 +486,8 @@ def reload(version=''): def initdStatus(): - if not app_debug: - if mw.isAppleSystem(): - return "Apple Computer does not support" + if mw.isAppleSystem(): + return "Apple Computer does not support" shell_cmd = 'systemctl status mysql | grep loaded | grep "enabled;"' data = mw.execShell(shell_cmd) From 5800da077c8d56d5b9b803fc20bb0e12dff13904 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 23:12:19 +0800 Subject: [PATCH 029/196] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=96=B0=E7=9A=84mys?= =?UTF-8?q?ql=E5=88=9D=E5=A7=8B=E5=8C=96=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/mysql/index.py | 112 +++++++++-------------------------------- 1 file changed, 23 insertions(+), 89 deletions(-) diff --git a/plugins/mysql/index.py b/plugins/mysql/index.py index f0971a70d..a4bb0c4f7 100755 --- a/plugins/mysql/index.py +++ b/plugins/mysql/index.py @@ -164,7 +164,7 @@ def initDreplace(version=''): mysql_tmp = getServerDir() + '/tmp' if not os.path.exists(mysql_tmp): os.mkdir(mysql_tmp) - mw.execShell("chown mysql:mysql " + mysql_tmp) + mw.execShell("chown -R mysql:mysql " + mysql_tmp) mysql_conf = mysql_conf_dir + '/my.cnf' if not os.path.exists(mysql_conf): @@ -296,8 +296,8 @@ def initMysqlData(): cmd = 'cd ' + serverdir + ' && ./scripts/mysql_install_db --user=' + \ user + ' --basedir=' + serverdir + ' --ldata=' + datadir mw.execShell(cmd) - return 0 - return 1 + return False + return True def initMysql57Data(): @@ -307,10 +307,10 @@ def initMysql57Data(): myconf = serverdir + "/etc/my.cnf" user = pGetDbUser() cmd = 'cd ' + serverdir + ' && ./bin/mysqld --defaults-file=' + myconf + \ - ' --initialize --explicit_defaults_for_timestamp' + ' --initialize-insecure --explicit_defaults_for_timestamp' mw.execShell(cmd) - return 0 - return 1 + return False + return True def initMysql8Data(): @@ -318,12 +318,16 @@ def initMysql8Data(): if not os.path.exists(datadir + '/mysql'): serverdir = getServerDir() user = pGetDbUser() + # cmd = 'cd ' + serverdir + ' && ./bin/mysqld --basedir=' + serverdir + ' --datadir=' + \ + # datadir + ' --initialize' + cmd = 'cd ' + serverdir + ' && ./bin/mysqld --basedir=' + serverdir + ' --datadir=' + \ - datadir + ' --initialize' + datadir + ' --initialize-insecure' + # print(cmd) mw.execShell(cmd) - return 0 - return 1 + return False + return True def initMysqlPwd(): @@ -352,65 +356,13 @@ def mysql8IsInitedPasswd(): def initMysql8Pwd(): - is_start = False - for x in range(60): - data = mw.execShell( - "ps -ef|grep mysql|grep -v grep|grep -v py|grep -v init.d|awk '{print $2}'") - if data[0] != "": - # print("mysql start ok!") - is_start = True - break - time.sleep(0.5) - - if not is_start: - # print("mysql start fail!") - return False + time.sleep(5) serverdir = getServerDir() pwd = mw.getRandomString(16) - - pass_cmd = "cat " + serverdir + \ - "/data/error.log | grep root@localhost | awk -F 'root@localhost:' '{print $2}'" - passdata = mw.execShell(pass_cmd) - password = passdata[0].strip() - - if len(password) == 0: - return True - - # print('localhost', 3306, 'root', password, - # "/www/server/mysql/mysql.sock") - - # import MySQLdb as mdb - # dbconn = mdb.connect(host='localhost', port=3306, user='root', - # passwd=password, unix_socket="/www/server/mysql/mysql.sock") - # dbconn.autocommit(True) - # dbcurr = dbconn.cursor() - # dbcurr.execute('SET NAMES UTF8MB4') - - # # with mysql_native_password - alter_root_pwd = 'flush privileges;' - alter_root_pwd = alter_root_pwd + \ - "alter user 'root'@'localhost' IDENTIFIED by '" + pwd + "';" - alter_root_pwd = alter_root_pwd + \ - "alter user 'root'@'localhost' IDENTIFIED WITH mysql_native_password by '" + pwd + "';" - alter_root_pwd = alter_root_pwd + "flush privileges;" - # dbcurr.execute(alter_root_pwd) - - tmp_file = "/tmp/mysql_init_tmp.log" - mw.writeFile(tmp_file, alter_root_pwd) - cmd_pass = serverdir + '/bin/mysql --connect-expired-password -uroot -p"' + \ - password + '" < ' + tmp_file - # print(cmd_pass) - data = mw.execShell(cmd_pass) - if data[1].find("ERROR") != -1: - # print(data[1]) - pass - else: - mw.writeFile(serverdir + "/data/error.log", "") - os.remove(tmp_file) - + cmd_pass = serverdir + '/bin/mysqladmin -uroot password ' + pwd pSqliteDb('config').where('id=?', (1,)).save('mysql_root', (pwd,)) - + mw.execShell(cmd_pass) return True @@ -419,7 +371,7 @@ def myOp(version, method): init_file = initDreplace() try: initData = initMysqlData() - if initData == 0: + if not initData: initMysqlPwd() mw.execShell('systemctl ' + method + ' mysql') @@ -431,34 +383,16 @@ def myOp(version, method): def my8cmd(version, method): # mysql 8.0 and 5.7 ok init_file = initDreplace(version) + isInited = 0 if version == '5.7': - initMysql57Data() + isInited = initMysql57Data() elif version == '8.0': - initMysql8Data() - try: + isInited = initMysql8Data() - if not mysql8IsInitedPasswd(): - setSkipGrantTables(True) - cmd_init_start = init_file + ' start' - subprocess.Popen(cmd_init_start, stdout=subprocess.PIPE, shell=True, - bufsize=4096, stderr=subprocess.PIPE) + if not isInited: + initMysql8Pwd() - time.sleep(6) - initMysql8Pwd() - - cmd_init_stop = init_file + ' stop' - subprocess.Popen(cmd_init_stop, stdout=subprocess.PIPE, shell=True, - bufsize=4096, stderr=subprocess.PIPE) - setSkipGrantTables(False) - - time.sleep(3) - my8cmd(version, method) - else: - mw.execShell('systemctl ' + method + ' mysql') - - return 'ok' - except Exception as e: - return str(e) + mw.execShell('systemctl ' + method + ' mysql') return 'fail' From c606cc115395c96c9db04b77c236e2b356601457 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 23:24:54 +0800 Subject: [PATCH 030/196] Update index.py --- plugins/mysql/index.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/mysql/index.py b/plugins/mysql/index.py index a4bb0c4f7..c5423caf0 100755 --- a/plugins/mysql/index.py +++ b/plugins/mysql/index.py @@ -381,7 +381,7 @@ def myOp(version, method): def my8cmd(version, method): - # mysql 8.0 and 5.7 ok + # mysql 8.0 and 5.7 init_file = initDreplace(version) isInited = 0 if version == '5.7': @@ -390,6 +390,7 @@ def my8cmd(version, method): isInited = initMysql8Data() if not isInited: + mw.execShell('systemctl start mysql') initMysql8Pwd() mw.execShell('systemctl ' + method + ' mysql') From 893be94261168433d1878b199addc413fe3e375f Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 23:36:23 +0800 Subject: [PATCH 031/196] Update index.py --- plugins/mysql/index.py | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/plugins/mysql/index.py b/plugins/mysql/index.py index c5423caf0..b8d037c55 100755 --- a/plugins/mysql/index.py +++ b/plugins/mysql/index.py @@ -356,13 +356,32 @@ def mysql8IsInitedPasswd(): def initMysql8Pwd(): - time.sleep(5) + time.sleep(2) serverdir = getServerDir() pwd = mw.getRandomString(16) - cmd_pass = serverdir + '/bin/mysqladmin -uroot password ' + pwd + + alter_root_pwd = 'flush privileges;' + alter_root_pwd = alter_root_pwd + \ + "alter user 'root'@'localhost' IDENTIFIED by '" + pwd + "';" + alter_root_pwd = alter_root_pwd + \ + "alter user 'root'@'localhost' IDENTIFIED WITH mysql_native_password by '" + pwd + "';" + alter_root_pwd = alter_root_pwd + "flush privileges;" + + cmd_pass = serverdir + '/bin/mysqladmin -uroot password root' + data = mw.execShell(cmd_pass) + # print(data) + + tmp_file = "/tmp/mysql_init_tmp.log" + mw.writeFile(tmp_file, alter_root_pwd) + cmd_pass = serverdir + '/bin/mysql -uroot -p"' + \ + password + '" < ' + tmp_file + + data = mw.execShell(cmd_pass) + # print(data) + pSqliteDb('config').where('id=?', (1,)).save('mysql_root', (pwd,)) - mw.execShell(cmd_pass) + return True From 544435d9b079ae89f03847f8e0796c69367aff79 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 23:37:06 +0800 Subject: [PATCH 032/196] Update index.py --- plugins/mysql/index.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/mysql/index.py b/plugins/mysql/index.py index b8d037c55..05bdd1d53 100755 --- a/plugins/mysql/index.py +++ b/plugins/mysql/index.py @@ -374,8 +374,7 @@ def initMysql8Pwd(): tmp_file = "/tmp/mysql_init_tmp.log" mw.writeFile(tmp_file, alter_root_pwd) - cmd_pass = serverdir + '/bin/mysql -uroot -p"' + \ - password + '" < ' + tmp_file + cmd_pass = serverdir + '/bin/mysql -uroot -proot < ' + tmp_file data = mw.execShell(cmd_pass) # print(data) From 18c90d0ba6b859430363e4fdfcc91e6d00ef16b1 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 23:37:30 +0800 Subject: [PATCH 033/196] Update index.py --- plugins/mysql/index.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/mysql/index.py b/plugins/mysql/index.py index 05bdd1d53..2d6c80f29 100755 --- a/plugins/mysql/index.py +++ b/plugins/mysql/index.py @@ -378,6 +378,7 @@ def initMysql8Pwd(): data = mw.execShell(cmd_pass) # print(data) + os.remove(tmp_file) pSqliteDb('config').where('id=?', (1,)).save('mysql_root', (pwd,)) From 6a2fd4bd386e5ac839d50f9884c0ca619781f62b Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 23:40:24 +0800 Subject: [PATCH 034/196] Update index.py --- plugins/mysql/index.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/mysql/index.py b/plugins/mysql/index.py index 2d6c80f29..c7f1138c2 100755 --- a/plugins/mysql/index.py +++ b/plugins/mysql/index.py @@ -411,6 +411,7 @@ def my8cmd(version, method): if not isInited: mw.execShell('systemctl start mysql') initMysql8Pwd() + mw.execShell('systemctl stop mysql') mw.execShell('systemctl ' + method + ' mysql') From 215be65bddb981b4379adfd7c50a833ce4faa628 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 23:55:33 +0800 Subject: [PATCH 035/196] Update mysqlDb.py --- plugins/gogs/class/mysqlDb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/gogs/class/mysqlDb.py b/plugins/gogs/class/mysqlDb.py index ee69c9dea..4ce57da67 100755 --- a/plugins/gogs/class/mysqlDb.py +++ b/plugins/gogs/class/mysqlDb.py @@ -21,7 +21,7 @@ class mysqlDb: def __Conn(self): '''连接MYSQL数据库''' try: - socket = '/tmp/mysql.sock' + socket = '/www/server/mysql/mysql.sock' try: import MySQLdb except Exception as ex: From 4344b84d0d3946ffd25d17c3baaa75a1752536e7 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 23:56:16 +0800 Subject: [PATCH 036/196] Update mysqlDb.py --- plugins/mysql/class/mysqlDb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/mysql/class/mysqlDb.py b/plugins/mysql/class/mysqlDb.py index 15bf62135..867d3f3d7 100755 --- a/plugins/mysql/class/mysqlDb.py +++ b/plugins/mysql/class/mysqlDb.py @@ -30,7 +30,7 @@ class mysqlDb: '''连接MYSQL数据库''' try: import mw - socket = '/tmp/mysql.sock' + socket = '/www/server/mysql/mysql.sock' try: import MySQLdb except Exception as ex: From bf9c85a210445fdef93547058053924eb35b8501 Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 24 Jun 2022 00:00:19 +0800 Subject: [PATCH 037/196] Update index.py --- plugins/mysql/index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/mysql/index.py b/plugins/mysql/index.py index c7f1138c2..873b435d9 100755 --- a/plugins/mysql/index.py +++ b/plugins/mysql/index.py @@ -415,7 +415,7 @@ def my8cmd(version, method): mw.execShell('systemctl ' + method + ' mysql') - return 'fail' + return 'ok' def appCMD(version, action): From b4fe6062a75891eb49d995f217efd6968b573385 Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 24 Jun 2022 00:01:41 +0800 Subject: [PATCH 038/196] Update index.py --- plugins/mysql/index.py | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/plugins/mysql/index.py b/plugins/mysql/index.py index 873b435d9..2f886e58c 100755 --- a/plugins/mysql/index.py +++ b/plugins/mysql/index.py @@ -403,19 +403,22 @@ def my8cmd(version, method): # mysql 8.0 and 5.7 init_file = initDreplace(version) isInited = 0 - if version == '5.7': - isInited = initMysql57Data() - elif version == '8.0': - isInited = initMysql8Data() - if not isInited: - mw.execShell('systemctl start mysql') - initMysql8Pwd() - mw.execShell('systemctl stop mysql') + try: + if version == '5.7': + isInited = initMysql57Data() + elif version == '8.0': + isInited = initMysql8Data() - mw.execShell('systemctl ' + method + ' mysql') + if not isInited: + mw.execShell('systemctl start mysql') + initMysql8Pwd() + mw.execShell('systemctl stop mysql') - return 'ok' + mw.execShell('systemctl ' + method + ' mysql') + return 'ok' + except Exception as e: + return str(e) def appCMD(version, action): From 1e1d13050cb82ca48bd82cfcc5757663b1afc2ef Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 24 Jun 2022 00:02:31 +0800 Subject: [PATCH 039/196] =?UTF-8?q?mysql8.0=20=E5=BF=AB=E9=80=9F=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=8C=96ok?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/mysql/index.py | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/mysql/index.py b/plugins/mysql/index.py index 2f886e58c..8359db991 100755 --- a/plugins/mysql/index.py +++ b/plugins/mysql/index.py @@ -403,7 +403,6 @@ def my8cmd(version, method): # mysql 8.0 and 5.7 init_file = initDreplace(version) isInited = 0 - try: if version == '5.7': isInited = initMysql57Data() From e1cd95537a3c9f0c257177529b75bfd0b555b67b Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 24 Jun 2022 00:35:00 +0800 Subject: [PATCH 040/196] bug issue tmeplate --- .github/ISSUE_TEMPLATE/ISSUE_TEMPLATE_1.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/ISSUE_TEMPLATE_1.md diff --git a/.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE_1.md b/.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE_1.md new file mode 100644 index 000000000..7fdfe71e9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE_1.md @@ -0,0 +1,17 @@ +--- +name: BUG提交 +about: 问题描述 +--- + +## 什么系统 ? + +debian11,centos7,centos8 stream ? + +## 错误信息 ? + +................start mw success +bash: line 149: ./scripts/init.d/mw: No such file or directory + +## 错误截图 ? + +... \ No newline at end of file From be9b63bef3d19099902da8e923372669ca3ab979 Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 24 Jun 2022 00:41:43 +0800 Subject: [PATCH 041/196] =?UTF-8?q?issue=20=E9=97=AE=E9=A2=98=E4=B8=8E?= =?UTF-8?q?=E9=9C=80=E6=B1=82=E7=9A=84=E8=A7=84=E8=8C=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/ISSUE_TEMPLATE/ISSUE_TEMPLATE_2.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/ISSUE_TEMPLATE_2.md diff --git a/.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE_2.md b/.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE_2.md new file mode 100644 index 000000000..8b1420e96 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE_2.md @@ -0,0 +1,14 @@ +--- +name: 需求提交 +about: 需求描述 +--- + +## 需求 + +想开发一个什么插件? +想有什么功能? + + +## 提供参考 + +给开发者提供参考! \ No newline at end of file From c19157a8c1078c9de3ff4418d3bc85fc20397dd6 Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 24 Jun 2022 09:55:39 +0800 Subject: [PATCH 042/196] up --- route/static/img/soft_ico/ico-upyun.png | Bin 1183 -> 0 bytes route/static/js/socket.io.min.js | 10 +++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) delete mode 100755 route/static/img/soft_ico/ico-upyun.png mode change 100755 => 100644 route/static/js/socket.io.min.js diff --git a/route/static/img/soft_ico/ico-upyun.png b/route/static/img/soft_ico/ico-upyun.png deleted file mode 100755 index 89c7710db482b511de1ef4465100c0ce93419c94..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1183 zcmV;Q1YrA#P)I- zU7sC@gMb3505H*~M-*6(s0?xldtC*XoIps#nPwnJZqvaY=;y_YF}cN_?41qBiB5s~ z233fJsW`M)>ykCQp2$SLPtJVt=FfIqV<2bh0Cg%8&(bGofU;6W;YFti2ZH}~95Lj@ zp$U-dHsifFR3+&bm-Wl)pY7abJ5G^Z;JK9Cx<+S72BMAIha)zo6cagrPZ20|@E4IN ztU+{0-X`=sS?eSL;V?1L0E9O;>~sNwT6jL}gnCh-a@Ga{ze5M%u;=!>vBY3OUkFnt z-E^i_Z6NSHqM|H#5(5I@DV@F&kzu`tAgu!gF?cjK)DVWLyK5>uV=c^Kt!8`p#de3%Hq#@L*&k#0)hxgmp$OxE>JCbwq2+EzBtIk z^bjBAxF=KZ@Z2|i77*x1fbOa9JP->6svI|{8Xf*kvX`fe7OAvi@E|8#AKQ7MKgmK>w$UC_^qXTPd$jUlIS7TyU1Nx!Ry zlr0DEDFP_m1@0~neN)lno_#AEL~Jf40D-qeC0$2B9mb*PDOJKhaGQG!&%}V>44fqy z2!<9)0O2LotKe}e3We-?@w_!tW7G;z%5vi=$~Bul){M>pnpWw<3+O3lbV=rv>o1hN z{|hS`1HnkL*ghezFYwNdazF;@(!&{9N2Yi=1ct9-BH`m$pP8@pi{fHTvPen5$Q2VJUJ23i2L0&&!this.encoding){var t=this.packetBuffer.shift();this.packet(t)}},n.prototype.cleanup=function(){for(var t;t=this.subs.shift();)t.destroy();this.packetBuffer=[],this.encoding=!1,this.decoder.destroy()},n.prototype.close=n.prototype.disconnect=function(){this.skipReconnect=!0,this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},n.prototype.onclose=function(t){p("close"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",t),this._reconnection&&!this.skipReconnect&&this.reconnect()},n.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var t=this;if(this.backoff.attempts>=this._reconnectionAttempts)p("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var e=this.backoff.duration();p("will wait %dms before reconnect attempt",e),this.reconnecting=!0;var n=setTimeout(function(){t.skipReconnect||(p("attempting reconnect"),t.emitAll("reconnect_attempt",t.backoff.attempts),t.emitAll("reconnecting",t.backoff.attempts),t.skipReconnect||t.open(function(e){e?(p("reconnect attempt error"),t.reconnecting=!1,t.reconnect(),t.emitAll("reconnect_error",e.data)):(p("reconnect success"),t.onreconnect())}))},e);this.subs.push({destroy:function(){clearTimeout(n)}})}},n.prototype.onreconnect=function(){var t=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",t)}},{"./on":4,"./socket":5,"./url":6,backo2:7,"component-bind":8,"component-emitter":9,debug:10,"engine.io-client":11,indexof:42,"object-component":43,"socket.io-parser":46}],4:[function(t,e){function n(t,e,n){return t.on(e,n),{destroy:function(){t.removeListener(e,n)}}}e.exports=n},{}],5:[function(t,e,n){function r(t,e){this.io=t,this.nsp=e,this.json=this,this.ids=0,this.acks={},this.io.autoConnect&&this.open(),this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0}var o=t("socket.io-parser"),i=t("component-emitter"),s=t("to-array"),a=t("./on"),c=t("component-bind"),p=t("debug")("socket.io-client:socket"),u=t("has-binary");e.exports=n=r;var f={connect:1,connect_error:1,connect_timeout:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1},h=i.prototype.emit;i(r.prototype),r.prototype.subEvents=function(){if(!this.subs){var t=this.io;this.subs=[a(t,"open",c(this,"onopen")),a(t,"packet",c(this,"onpacket")),a(t,"close",c(this,"onclose"))]}},r.prototype.open=r.prototype.connect=function(){return this.connected?this:(this.subEvents(),this.io.open(),"open"==this.io.readyState&&this.onopen(),this)},r.prototype.send=function(){var t=s(arguments);return t.unshift("message"),this.emit.apply(this,t),this},r.prototype.emit=function(t){if(f.hasOwnProperty(t))return h.apply(this,arguments),this;var e=s(arguments),n=o.EVENT;u(e)&&(n=o.BINARY_EVENT);var r={type:n,data:e};return"function"==typeof e[e.length-1]&&(p("emitting packet with ack id %d",this.ids),this.acks[this.ids]=e.pop(),r.id=this.ids++),this.connected?this.packet(r):this.sendBuffer.push(r),this},r.prototype.packet=function(t){t.nsp=this.nsp,this.io.packet(t)},r.prototype.onopen=function(){p("transport is open - connecting"),"/"!=this.nsp&&this.packet({type:o.CONNECT})},r.prototype.onclose=function(t){p("close (%s)",t),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",t)},r.prototype.onpacket=function(t){if(t.nsp==this.nsp)switch(t.type){case o.CONNECT:this.onconnect();break;case o.EVENT:this.onevent(t);break;case o.BINARY_EVENT:this.onevent(t);break;case o.ACK:this.onack(t);break;case o.BINARY_ACK:this.onack(t);break;case o.DISCONNECT:this.ondisconnect();break;case o.ERROR:this.emit("error",t.data)}},r.prototype.onevent=function(t){var e=t.data||[];p("emitting event %j",e),null!=t.id&&(p("attaching ack callback to event"),e.push(this.ack(t.id))),this.connected?h.apply(this,e):this.receiveBuffer.push(e)},r.prototype.ack=function(t){var e=this,n=!1;return function(){if(!n){n=!0;var r=s(arguments);p("sending ack %j",r);var i=u(r)?o.BINARY_ACK:o.ACK;e.packet({type:i,id:t,data:r})}}},r.prototype.onack=function(t){p("calling ack %s with %j",t.id,t.data);var e=this.acks[t.id];e.apply(this,t.data),delete this.acks[t.id]},r.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},r.prototype.emitBuffered=function(){var t;for(t=0;t0&&t.jitter<=1?t.jitter:0,this.attempts=0}e.exports=n,n.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=0==(1&Math.floor(10*e))?t-n:t+n}return 0|Math.min(t,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(t){this.ms=t},n.prototype.setMax=function(t){this.max=t},n.prototype.setJitter=function(t){this.jitter=t}},{}],8:[function(t,e){var n=[].slice;e.exports=function(t,e){if("string"==typeof e&&(e=t[e]),"function"!=typeof e)throw new Error("bind() requires a function");var r=n.call(arguments,2);return function(){return e.apply(t,r.concat(n.call(arguments)))}}},{}],9:[function(t,e){function n(t){return t?r(t):void 0}function r(t){for(var e in n.prototype)t[e]=n.prototype[e];return t}e.exports=n,n.prototype.on=n.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks[t]=this._callbacks[t]||[]).push(e),this},n.prototype.once=function(t,e){function n(){r.off(t,n),e.apply(this,arguments)}var r=this;return this._callbacks=this._callbacks||{},n.fn=e,this.on(t,n),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n=this._callbacks[t];if(!n)return this;if(1==arguments.length)return delete this._callbacks[t],this;for(var r,o=0;or;++r)n[r].apply(this,e)}return this},n.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks[t]||[]},n.prototype.hasListeners=function(t){return!!this.listeners(t).length}},{}],10:[function(t,e){function n(t){return n.enabled(t)?function(e){e=r(e);var o=new Date,i=o-(n[t]||o);n[t]=o,e=t+" "+e+" +"+n.humanize(i),window.console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}:function(){}}function r(t){return t instanceof Error?t.stack||t.message:t}e.exports=n,n.names=[],n.skips=[],n.enable=function(t){try{localStorage.debug=t}catch(e){}for(var r=(t||"").split(/[\s,]+/),o=r.length,i=0;o>i;i++)t=r[i].replace("*",".*?"),"-"===t[0]?n.skips.push(new RegExp("^"+t.substr(1)+"$")):n.names.push(new RegExp("^"+t+"$"))},n.disable=function(){n.enable("")},n.humanize=function(t){var e=1e3,n=6e4,r=60*n;return t>=r?(t/r).toFixed(1)+"h":t>=n?(t/n).toFixed(1)+"m":t>=e?(t/e|0)+"s":t+"ms"},n.enabled=function(t){for(var e=0,r=n.skips.length;r>e;e++)if(n.skips[e].test(t))return!1;for(var e=0,r=n.names.length;r>e;e++)if(n.names[e].test(t))return!0;return!1};try{window.localStorage&&n.enable(localStorage.debug)}catch(o){}},{}],11:[function(t,e){e.exports=t("./lib/")},{"./lib/":12}],12:[function(t,e){e.exports=t("./socket"),e.exports.parser=t("engine.io-parser")},{"./socket":13,"engine.io-parser":25}],13:[function(t,e){(function(n){function r(t,e){if(!(this instanceof r))return new r(t,e);if(e=e||{},t&&"object"==typeof t&&(e=t,t=null),t&&(t=u(t),e.host=t.host,e.secure="https"==t.protocol||"wss"==t.protocol,e.port=t.port,t.query&&(e.query=t.query)),this.secure=null!=e.secure?e.secure:n.location&&"https:"==location.protocol,e.host){var o=e.host.split(":");e.hostname=o.shift(),o.length?e.port=o.pop():e.port||(e.port=this.secure?"443":"80")}this.agent=e.agent||!1,this.hostname=e.hostname||(n.location?location.hostname:"localhost"),this.port=e.port||(n.location&&location.port?location.port:this.secure?443:80),this.query=e.query||{},"string"==typeof this.query&&(this.query=h.decode(this.query)),this.upgrade=!1!==e.upgrade,this.path=(e.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!e.forceJSONP,this.jsonp=!1!==e.jsonp,this.forceBase64=!!e.forceBase64,this.enablesXDR=!!e.enablesXDR,this.timestampParam=e.timestampParam||"t",this.timestampRequests=e.timestampRequests,this.transports=e.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.callbackBuffer=[],this.policyPort=e.policyPort||843,this.rememberUpgrade=e.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=e.onlyBinaryUpgrades,this.pfx=e.pfx||null,this.key=e.key||null,this.passphrase=e.passphrase||null,this.cert=e.cert||null,this.ca=e.ca||null,this.ciphers=e.ciphers||null,this.rejectUnauthorized=e.rejectUnauthorized||null,this.open()}function o(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}var i=t("./transports"),s=t("component-emitter"),a=t("debug")("engine.io-client:socket"),c=t("indexof"),p=t("engine.io-parser"),u=t("parseuri"),f=t("parsejson"),h=t("parseqs");e.exports=r,r.priorWebsocketSuccess=!1,s(r.prototype),r.protocol=p.protocol,r.Socket=r,r.Transport=t("./transport"),r.transports=t("./transports"),r.parser=t("engine.io-parser"),r.prototype.createTransport=function(t){a('creating transport "%s"',t);var e=o(this.query);e.EIO=p.protocol,e.transport=t,this.id&&(e.sid=this.id);var n=new i[t]({agent:this.agent,hostname:this.hostname,port:this.port,secure:this.secure,path:this.path,query:e,forceJSONP:this.forceJSONP,jsonp:this.jsonp,forceBase64:this.forceBase64,enablesXDR:this.enablesXDR,timestampRequests:this.timestampRequests,timestampParam:this.timestampParam,policyPort:this.policyPort,socket:this,pfx:this.pfx,key:this.key,passphrase:this.passphrase,cert:this.cert,ca:this.ca,ciphers:this.ciphers,rejectUnauthorized:this.rejectUnauthorized});return n},r.prototype.open=function(){var t;if(this.rememberUpgrade&&r.priorWebsocketSuccess&&-1!=this.transports.indexOf("websocket"))t="websocket";else{if(0==this.transports.length){var e=this;return void setTimeout(function(){e.emit("error","No transports available")},0)}t=this.transports[0]}this.readyState="opening";var t;try{t=this.createTransport(t)}catch(n){return this.transports.shift(),void this.open()}t.open(),this.setTransport(t)},r.prototype.setTransport=function(t){a("setting transport %s",t.name);var e=this;this.transport&&(a("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=t,t.on("drain",function(){e.onDrain()}).on("packet",function(t){e.onPacket(t)}).on("error",function(t){e.onError(t)}).on("close",function(){e.onClose("transport close")})},r.prototype.probe=function(t){function e(){if(h.onlyBinaryUpgrades){var e=!this.supportsBinary&&h.transport.supportsBinary;f=f||e}f||(a('probe transport "%s" opened',t),u.send([{type:"ping",data:"probe"}]),u.once("packet",function(e){if(!f)if("pong"==e.type&&"probe"==e.data){if(a('probe transport "%s" pong',t),h.upgrading=!0,h.emit("upgrading",u),!u)return;r.priorWebsocketSuccess="websocket"==u.name,a('pausing current transport "%s"',h.transport.name),h.transport.pause(function(){f||"closed"!=h.readyState&&(a("changing transport and sending upgrade packet"),p(),h.setTransport(u),u.send([{type:"upgrade"}]),h.emit("upgrade",u),u=null,h.upgrading=!1,h.flush())})}else{a('probe transport "%s" failed',t);var n=new Error("probe error");n.transport=u.name,h.emit("upgradeError",n)}}))}function n(){f||(f=!0,p(),u.close(),u=null)}function o(e){var r=new Error("probe error: "+e);r.transport=u.name,n(),a('probe transport "%s" failed because of error: %s',t,e),h.emit("upgradeError",r)}function i(){o("transport closed")}function s(){o("socket closed")}function c(t){u&&t.name!=u.name&&(a('"%s" works - aborting "%s"',t.name,u.name),n())}function p(){u.removeListener("open",e),u.removeListener("error",o),u.removeListener("close",i),h.removeListener("close",s),h.removeListener("upgrading",c)}a('probing transport "%s"',t);var u=this.createTransport(t,{probe:1}),f=!1,h=this;r.priorWebsocketSuccess=!1,u.once("open",e),u.once("error",o),u.once("close",i),this.once("close",s),this.once("upgrading",c),u.open()},r.prototype.onOpen=function(){if(a("socket open"),this.readyState="open",r.priorWebsocketSuccess="websocket"==this.transport.name,this.emit("open"),this.flush(),"open"==this.readyState&&this.upgrade&&this.transport.pause){a("starting upgrade probes");for(var t=0,e=this.upgrades.length;e>t;t++)this.probe(this.upgrades[t])}},r.prototype.onPacket=function(t){if("opening"==this.readyState||"open"==this.readyState)switch(a('socket receive: type "%s", data "%s"',t.type,t.data),this.emit("packet",t),this.emit("heartbeat"),t.type){case"open":this.onHandshake(f(t.data));break;case"pong":this.setPing();break;case"error":var e=new Error("server error");e.code=t.data,this.emit("error",e);break;case"message":this.emit("data",t.data),this.emit("message",t.data)}else a('packet received with socket readyState "%s"',this.readyState)},r.prototype.onHandshake=function(t){this.emit("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.onOpen(),"closed"!=this.readyState&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},r.prototype.onHeartbeat=function(t){clearTimeout(this.pingTimeoutTimer);var e=this;e.pingTimeoutTimer=setTimeout(function(){"closed"!=e.readyState&&e.onClose("ping timeout")},t||e.pingInterval+e.pingTimeout)},r.prototype.setPing=function(){var t=this;clearTimeout(t.pingIntervalTimer),t.pingIntervalTimer=setTimeout(function(){a("writing ping packet - expecting pong within %sms",t.pingTimeout),t.ping(),t.onHeartbeat(t.pingTimeout)},t.pingInterval)},r.prototype.ping=function(){this.sendPacket("ping")},r.prototype.onDrain=function(){for(var t=0;tn;n++)~c(this.transports,t[n])&&e.push(t[n]);return e}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./transport":14,"./transports":15,"component-emitter":9,debug:22,"engine.io-parser":25,indexof:42,parsejson:34,parseqs:35,parseuri:36}],14:[function(t,e){function n(t){this.path=t.path,this.hostname=t.hostname,this.port=t.port,this.secure=t.secure,this.query=t.query,this.timestampParam=t.timestampParam,this.timestampRequests=t.timestampRequests,this.readyState="",this.agent=t.agent||!1,this.socket=t.socket,this.enablesXDR=t.enablesXDR,this.pfx=t.pfx,this.key=t.key,this.passphrase=t.passphrase,this.cert=t.cert,this.ca=t.ca,this.ciphers=t.ciphers,this.rejectUnauthorized=t.rejectUnauthorized}var r=t("engine.io-parser"),o=t("component-emitter");e.exports=n,o(n.prototype),n.timestamps=0,n.prototype.onError=function(t,e){var n=new Error(t);return n.type="TransportError",n.description=e,this.emit("error",n),this},n.prototype.open=function(){return("closed"==this.readyState||""==this.readyState)&&(this.readyState="opening",this.doOpen()),this},n.prototype.close=function(){return("opening"==this.readyState||"open"==this.readyState)&&(this.doClose(),this.onClose()),this},n.prototype.send=function(t){if("open"!=this.readyState)throw new Error("Transport not open");this.write(t)},n.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},n.prototype.onData=function(t){var e=r.decodePacket(t,this.socket.binaryType);this.onPacket(e)},n.prototype.onPacket=function(t){this.emit("packet",t)},n.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},{"component-emitter":9,"engine.io-parser":25}],15:[function(t,e,n){(function(e){function r(t){var n,r=!1,a=!1,c=!1!==t.jsonp;if(e.location){var p="https:"==location.protocol,u=location.port;u||(u=p?443:80),r=t.hostname!=location.hostname||u!=t.port,a=t.secure!=p}if(t.xdomain=r,t.xscheme=a,n=new o(t),"open"in n&&!t.forceJSONP)return new i(t);if(!c)throw new Error("JSONP disabled");return new s(t)}var o=t("xmlhttprequest"),i=t("./polling-xhr"),s=t("./polling-jsonp"),a=t("./websocket");n.polling=r,n.websocket=a}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./polling-jsonp":16,"./polling-xhr":17,"./websocket":19,xmlhttprequest:20}],16:[function(t,e){(function(n){function r(){}function o(t){i.call(this,t),this.query=this.query||{},a||(n.___eio||(n.___eio=[]),a=n.___eio),this.index=a.length;var e=this;a.push(function(t){e.onData(t)}),this.query.j=this.index,n.document&&n.addEventListener&&n.addEventListener("beforeunload",function(){e.script&&(e.script.onerror=r)},!1)}var i=t("./polling"),s=t("component-inherit");e.exports=o;var a,c=/\n/g,p=/\\n/g;s(o,i),o.prototype.supportsBinary=!1,o.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),i.prototype.doClose.call(this)},o.prototype.doPoll=function(){var t=this,e=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),e.async=!0,e.src=this.uri(),e.onerror=function(e){t.onError("jsonp poll error",e)};var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(e,n),this.script=e;var r="undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent);r&&setTimeout(function(){var t=document.createElement("iframe");document.body.appendChild(t),document.body.removeChild(t)},100)},o.prototype.doWrite=function(t,e){function n(){r(),e()}function r(){if(o.iframe)try{o.form.removeChild(o.iframe)}catch(t){o.onError("jsonp polling iframe removal error",t)}try{var e='
'+lan.bt.task_name+''+lan.bt.task_time+'