From 104f3aecf5aae58d2e8c147418f4a97420a86c88 Mon Sep 17 00:00:00 2001 From: xcsoft Date: Tue, 21 Jun 2022 12:29:58 +0800 Subject: [PATCH 001/298] Create mds-cli --- mds-cli | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 mds-cli diff --git a/mds-cli b/mds-cli new file mode 100644 index 000000000..907f97f34 --- /dev/null +++ b/mds-cli @@ -0,0 +1,73 @@ +#!/www/server/mdserver-web/bin/python +# description: mdserver-web cli tools +# ln -s /www/server/mdserver-web/mds-cli /usr/bin/mds-cli +import os +import sys + +def mw_start(): + """ + Start mdserver-web + """ + os.system('bash cli.sh start') + print("服务已启动") + + +def mw_stop(): + """ + stop mdserver-web + """ + os.system('bash cli.sh stop') + print("服务已停止") + +def mw_restart(): + """ + restart mdserver-web + """ + os.system('bash cli.sh stop && bash cli.sh start') + print("服务已重启") + +def mw_reset_username(): + """ + reset mdserver-web username + """ + from tools import set_panel_username + user_name = input("请输入新的用户名: ") + set_panel_username(user_name) + +def mw_reset_pwd(): + """ + reset mdserver-web password + """ + from tools import set_panel_pwd + pwd = input("请输入新的密码: ") + set_panel_pwd(pwd, True) + + +if __name__ == '__main__': + sys.path.append(os.getcwd() + "/class/core") + + try: + str = ''' + ==== mdserver-web cli tools ==== + 1. 启动服务 2. 停止服务 + 3. 重启服务 4. 修改用户名 + 5. 修改密码 + ================================= + ''' + print(str) + sw = input("请输入您要进行的操作: ") + + if sw == '1': + mw_start() + elif sw == '2': + mw_stop() + elif sw == '3': + mw_restart() + elif sw == '4': + mw_reset_username() + elif sw == '5': + mw_reset_pwd() + else: + print("操作不存在") + except KeyboardInterrupt: + print("\n操作已终止") From d252ab9aa85e52c0fd45dc4c5a3989097cb3806f Mon Sep 17 00:00:00 2001 From: xcsoft Date: Tue, 21 Jun 2022 12:30:54 +0800 Subject: [PATCH 002/298] add mds-cli --- scripts/install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/install.sh b/scripts/install.sh index 44552dddb..9d894d9af 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -74,7 +74,8 @@ fi echo "use system version: ${OSNAME}" curl -fsSL https://raw.githubusercontent.com/midoks/mdserver-web/master/scripts/install/${OSNAME}.sh | bash +ln -s /www/server/mdserver-web/mds-cli /usr/bin/mds-cli endTime=`date +%s` ((outTime=(${endTime}-${startTime})/60)) -echo -e "Time consumed:\033[32m $outTime \033[0mMinute!" \ No newline at end of file +echo -e "Time consumed:\033[32m $outTime \033[0mMinute!" From 381e941cf138ba178e821726f756e631508aa138 Mon Sep 17 00:00:00 2001 From: xcsoft Date: Tue, 21 Jun 2022 12:32:56 +0800 Subject: [PATCH 003/298] Update install.sh --- scripts/install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install.sh b/scripts/install.sh index 9d894d9af..814cfbc95 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -74,6 +74,7 @@ fi echo "use system version: ${OSNAME}" curl -fsSL https://raw.githubusercontent.com/midoks/mdserver-web/master/scripts/install/${OSNAME}.sh | bash +chmod +x /www/server/mdserver-web/mds-cli ln -s /www/server/mdserver-web/mds-cli /usr/bin/mds-cli endTime=`date +%s` From d0a449a57237b7665d20cba85371cb25b0c87969 Mon Sep 17 00:00:00 2001 From: xcsoft Date: Tue, 21 Jun 2022 12:37:42 +0800 Subject: [PATCH 004/298] Update mds-cli --- mds-cli | 1 + 1 file changed, 1 insertion(+) diff --git a/mds-cli b/mds-cli index 907f97f34..2ff326018 100644 --- a/mds-cli +++ b/mds-cli @@ -44,6 +44,7 @@ def mw_reset_pwd(): if __name__ == '__main__': + os.chdir("/www/server/mdserver-web") sys.path.append(os.getcwd() + "/class/core") try: From 4307700d0382b15251021110da81695e8cb21ee0 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 21 Jun 2022 12:51:30 +0800 Subject: [PATCH 005/298] Update centos.sh --- scripts/install/centos.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/install/centos.sh b/scripts/install/centos.sh index 49ae894eb..f2b20f964 100755 --- a/scripts/install/centos.sh +++ b/scripts/install/centos.sh @@ -86,13 +86,13 @@ cd /www/server/mdserver-web/scripts && bash lib.sh chmod 755 /www/server/mdserver-web/data +pip install --upgrade pip if [ ! -f /www/server/mdserver-web/bin/activate ];then cd /www/server/mdserver-web && python3 -m venv . fi if [ -f /www/server/mdserver-web/bin/activate ];then cd /www/server/mdserver-web && source /www/server/mdserver-web/bin/activate && pip3 install -r /www/server/mdserver-web/requirements.txt - pip install --upgrade pip pip3 install gunicorn==20.1.0 pip3 install gevent==21.1.2 pip3 install gevent-websocket==0.10.1 @@ -102,7 +102,6 @@ if [ -f /www/server/mdserver-web/bin/activate ];then pip3 install psutil==5.9.1 pip3 install pymongo else - pip install --upgrade pip cd /www/server/mdserver-web && pip3 install -r /www/server/mdserver-web/requirements.txt pip3 install gunicorn==20.1.0 pip3 install gevent==21.1.2 From 90fc96c04eb770ae50ae07d76b9fc7156ee8e9cd Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 21 Jun 2022 12:51:57 +0800 Subject: [PATCH 006/298] Update centos.sh --- scripts/install/centos.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/install/centos.sh b/scripts/install/centos.sh index f2b20f964..e330b24aa 100755 --- a/scripts/install/centos.sh +++ b/scripts/install/centos.sh @@ -93,6 +93,7 @@ fi if [ -f /www/server/mdserver-web/bin/activate ];then cd /www/server/mdserver-web && source /www/server/mdserver-web/bin/activate && pip3 install -r /www/server/mdserver-web/requirements.txt + pip install --upgrade pip pip3 install gunicorn==20.1.0 pip3 install gevent==21.1.2 pip3 install gevent-websocket==0.10.1 @@ -103,6 +104,7 @@ if [ -f /www/server/mdserver-web/bin/activate ];then pip3 install pymongo else cd /www/server/mdserver-web && pip3 install -r /www/server/mdserver-web/requirements.txt + pip install --upgrade pip pip3 install gunicorn==20.1.0 pip3 install gevent==21.1.2 pip3 install gevent-websocket==0.10.1 From b60689bc707079f0b654564ee1a5d33ef9e2f4c8 Mon Sep 17 00:00:00 2001 From: soxft Date: Tue, 21 Jun 2022 12:52:28 +0800 Subject: [PATCH 007/298] fix --- mds-cli => mw-cli | 29 ++++++++++++++++++----------- scripts/install.sh | 4 ++-- 2 files changed, 20 insertions(+), 13 deletions(-) rename mds-cli => mw-cli (79%) diff --git a/mds-cli b/mw-cli similarity index 79% rename from mds-cli rename to mw-cli index 2ff326018..8d5f63f10 100644 --- a/mds-cli +++ b/mw-cli @@ -1,31 +1,34 @@ #!/www/server/mdserver-web/bin/python # description: mdserver-web cli tools -# ln -s /www/server/mdserver-web/mds-cli /usr/bin/mds-cli +# ln -s /www/server/mdserver-web/mw-cli /usr/bin/mw-cli import os import sys + def mw_start(): """ Start mdserver-web """ - os.system('bash cli.sh start') + os.system('systemctl start mw') print("服务已启动") - - + + def mw_stop(): """ stop mdserver-web """ - os.system('bash cli.sh stop') + os.system('systemctl stop mw') print("服务已停止") + def mw_restart(): """ restart mdserver-web """ - os.system('bash cli.sh stop && bash cli.sh start') + os.system('systemctl restart mw') print("服务已重启") + def mw_reset_username(): """ reset mdserver-web username @@ -33,7 +36,8 @@ def mw_reset_username(): from tools import set_panel_username user_name = input("请输入新的用户名: ") set_panel_username(user_name) - + + def mw_reset_pwd(): """ reset mdserver-web password @@ -44,9 +48,9 @@ def mw_reset_pwd(): if __name__ == '__main__': - os.chdir("/www/server/mdserver-web") + os.chdir("/www/server/mdserver-web") sys.path.append(os.getcwd() + "/class/core") - + try: str = ''' ==== mdserver-web cli tools ==== @@ -55,8 +59,11 @@ if __name__ == '__main__': 5. 修改密码 ================================= ''' - print(str) - sw = input("请输入您要进行的操作: ") + if len(sys.argv) == 2: + sw = sys.argv[1] + else: + print(str) + sw = input("请输入您要进行的操作: ") if sw == '1': mw_start() diff --git a/scripts/install.sh b/scripts/install.sh index 814cfbc95..25f0f0f00 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -74,8 +74,8 @@ fi echo "use system version: ${OSNAME}" curl -fsSL https://raw.githubusercontent.com/midoks/mdserver-web/master/scripts/install/${OSNAME}.sh | bash -chmod +x /www/server/mdserver-web/mds-cli -ln -s /www/server/mdserver-web/mds-cli /usr/bin/mds-cli +chmod +x /www/server/mdserver-web/mw-cli +ln -s /www/server/mdserver-web/mw-cli /usr/bin/mw-cli endTime=`date +%s` ((outTime=(${endTime}-${startTime})/60)) From 2805b7bdc49db230a572099cb0dce7c3821fa805 Mon Sep 17 00:00:00 2001 From: soxft Date: Tue, 21 Jun 2022 12:57:29 +0800 Subject: [PATCH 008/298] remove * --- scripts/init.d/mw.tpl | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/init.d/mw.tpl b/scripts/init.d/mw.tpl index 4c5192f11..437b3a662 100755 --- a/scripts/init.d/mw.tpl +++ b/scripts/init.d/mw.tpl @@ -185,13 +185,11 @@ case "$1" in if [ -f $mw_path/data/admin_path.pl ];then auth_path=$(cat $mw_path/data/admin_path.pl) fi - if [ "$address" = "" ];then - address=$(curl -sS --connect-timeout 10 -m 60 https://www.bt.cn/Api/getIpAddress) - fi + echo -e "==================================================================" echo -e "\033[32mMW-Panel default info!\033[0m" echo -e "==================================================================" - echo "MW-Panel-URL: http://$address:$port$auth_path" + echo -e "MW-Panel-URL: http://$address:$port$auth_path" echo -e `python3 $mw_path/tools.py username` echo -e "password: $password" echo -e "\033[33mWarning:\033[0m" From 461a9582dffcf0e1f84afaac38f49d58726b4f2f Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 21 Jun 2022 14:12:31 +0800 Subject: [PATCH 009/298] Update centos.sh --- scripts/install/centos.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/install/centos.sh b/scripts/install/centos.sh index e330b24aa..0ebc07ca1 100755 --- a/scripts/install/centos.sh +++ b/scripts/install/centos.sh @@ -82,10 +82,16 @@ if [ ! -f /usr/local/bin/pip3 ];then fi +echo "start install lib" cd /www/server/mdserver-web/scripts && bash lib.sh +echo "end install lib" + + chmod 755 /www/server/mdserver-web/data +echo "start install python lib" + pip install --upgrade pip if [ ! -f /www/server/mdserver-web/bin/activate ];then cd /www/server/mdserver-web && python3 -m venv . @@ -115,6 +121,8 @@ else pip3 install pymongo fi +echo "end install python lib" + cd /www/server/mdserver-web && ./cli.sh start sleep 5 From dee6a755835dae6d34690c9e347cc1de5cd17910 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 21 Jun 2022 14:13:18 +0800 Subject: [PATCH 010/298] Update centos.sh --- scripts/install/centos.sh | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/scripts/install/centos.sh b/scripts/install/centos.sh index 0ebc07ca1..016f19203 100755 --- a/scripts/install/centos.sh +++ b/scripts/install/centos.sh @@ -93,6 +93,15 @@ chmod 755 /www/server/mdserver-web/data echo "start install python lib" pip install --upgrade pip +pip3 install gunicorn==20.1.0 +pip3 install gevent==21.1.2 +pip3 install gevent-websocket==0.10.1 +pip3 install requests==2.20.0 +pip3 install flask-caching==1.10.1 +pip3 install python-socketio==4.2.0 +pip3 install psutil==5.9.1 +pip3 install pymongo + if [ ! -f /www/server/mdserver-web/bin/activate ];then cd /www/server/mdserver-web && python3 -m venv . fi @@ -110,15 +119,7 @@ if [ -f /www/server/mdserver-web/bin/activate ];then pip3 install pymongo else cd /www/server/mdserver-web && pip3 install -r /www/server/mdserver-web/requirements.txt - pip install --upgrade pip - pip3 install gunicorn==20.1.0 - pip3 install gevent==21.1.2 - pip3 install gevent-websocket==0.10.1 - pip3 install requests==2.20.0 - pip3 install flask-caching==1.10.1 - pip3 install python-socketio==4.2.0 - pip3 install psutil==5.9.1 - pip3 install pymongo + fi echo "end install python lib" From 43259330e169976de50b8826555ccd3cdecd2df2 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 21 Jun 2022 15:01:29 +0800 Subject: [PATCH 011/298] up --- scripts/install/centos.sh | 1 - scripts/install_dev.sh | 2 +- scripts/update_dev.sh | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/install/centos.sh b/scripts/install/centos.sh index 016f19203..cd8aef071 100755 --- a/scripts/install/centos.sh +++ b/scripts/install/centos.sh @@ -119,7 +119,6 @@ if [ -f /www/server/mdserver-web/bin/activate ];then pip3 install pymongo else cd /www/server/mdserver-web && pip3 install -r /www/server/mdserver-web/requirements.txt - fi echo "end install python lib" diff --git a/scripts/install_dev.sh b/scripts/install_dev.sh index 643698616..a2710a7ab 100755 --- a/scripts/install_dev.sh +++ b/scripts/install_dev.sh @@ -72,7 +72,7 @@ if [ $OSNAME != "macos" ];then fi echo "use system version: ${OSNAME}" -curl -fsSL https://gitee.com/midoks/mdserver-web/raw/master/scripts/install/${OSNAME}.sh | bash +curl -fsSL https://gitee.com/midoks/mdserver-web/raw/dev/scripts/install/${OSNAME}.sh | bash endTime=`date +%s` diff --git a/scripts/update_dev.sh b/scripts/update_dev.sh index 35285da74..ea986c847 100755 --- a/scripts/update_dev.sh +++ b/scripts/update_dev.sh @@ -52,7 +52,7 @@ rm -rf /tmp/mdserver-web-dev #pip uninstall public echo "use system version: ${OSNAME}" -curl -fsSL https://gitee.com/midoks/mdserver-web/raw/master/scripts/update/${OSNAME}.sh | bash +curl -fsSL https://gitee.com/midoks/mdserver-web/raw/dev/scripts/update/${OSNAME}.sh | bash endTime=`date +%s` ((outTime=($endTime-$startTime)/60)) From bdb4d70d8d60d9f3d6c0b4995b06f88a9732a194 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 21 Jun 2022 15:45:13 +0800 Subject: [PATCH 012/298] up --- scripts/install_dev.sh | 3 ++- scripts/update_dev.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/install_dev.sh b/scripts/install_dev.sh index a2710a7ab..6a58f0d3d 100755 --- a/scripts/install_dev.sh +++ b/scripts/install_dev.sh @@ -72,7 +72,8 @@ if [ $OSNAME != "macos" ];then fi echo "use system version: ${OSNAME}" -curl -fsSL https://gitee.com/midoks/mdserver-web/raw/dev/scripts/install/${OSNAME}.sh | bash + +curl -fsSL https://raw.githubusercontent.com/midoks/mdserver-web/dev/scripts/install/${OSNAME}.sh | bash endTime=`date +%s` diff --git a/scripts/update_dev.sh b/scripts/update_dev.sh index ea986c847..e3bf41f4a 100755 --- a/scripts/update_dev.sh +++ b/scripts/update_dev.sh @@ -52,7 +52,7 @@ rm -rf /tmp/mdserver-web-dev #pip uninstall public echo "use system version: ${OSNAME}" -curl -fsSL https://gitee.com/midoks/mdserver-web/raw/dev/scripts/update/${OSNAME}.sh | bash +curl -fsSL https://raw.githubusercontent.com/midoks/mdserver-web/dev/scripts/update/${OSNAME}.sh | bash endTime=`date +%s` ((outTime=($endTime-$startTime)/60)) From e7a3b175494474146ee73e4020009e38b6dd195c Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 21 Jun 2022 16:24:36 +0800 Subject: [PATCH 013/298] Update centos.sh --- scripts/install/centos.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install/centos.sh b/scripts/install/centos.sh index cd8aef071..1576d53ff 100755 --- a/scripts/install/centos.sh +++ b/scripts/install/centos.sh @@ -102,6 +102,8 @@ pip3 install python-socketio==4.2.0 pip3 install psutil==5.9.1 pip3 install pymongo +cd /www/server/mdserver-web && pip3 install -r /www/server/mdserver-web/requirements.txt + if [ ! -f /www/server/mdserver-web/bin/activate ];then cd /www/server/mdserver-web && python3 -m venv . fi @@ -117,8 +119,6 @@ if [ -f /www/server/mdserver-web/bin/activate ];then pip3 install python-socketio==4.2.0 pip3 install psutil==5.9.1 pip3 install pymongo -else - cd /www/server/mdserver-web && pip3 install -r /www/server/mdserver-web/requirements.txt fi echo "end install python lib" From 8e4cf4971e3e4890df5f7dd8a367c8cfde2d4cad Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 21 Jun 2022 17:12:25 +0800 Subject: [PATCH 014/298] Update centos.sh --- scripts/install/centos.sh | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/scripts/install/centos.sh b/scripts/install/centos.sh index 1576d53ff..578a09c7a 100755 --- a/scripts/install/centos.sh +++ b/scripts/install/centos.sh @@ -105,20 +105,13 @@ pip3 install pymongo cd /www/server/mdserver-web && pip3 install -r /www/server/mdserver-web/requirements.txt if [ ! -f /www/server/mdserver-web/bin/activate ];then - cd /www/server/mdserver-web && python3 -m venv . + cd /www/server/mdserver-web && python3 -m venv . + sleep 5 fi if [ -f /www/server/mdserver-web/bin/activate ];then cd /www/server/mdserver-web && source /www/server/mdserver-web/bin/activate && pip3 install -r /www/server/mdserver-web/requirements.txt pip install --upgrade pip - pip3 install gunicorn==20.1.0 - pip3 install gevent==21.1.2 - pip3 install gevent-websocket==0.10.1 - pip3 install requests==2.20.0 - pip3 install flask-caching==1.10.1 - pip3 install python-socketio==4.2.0 - pip3 install psutil==5.9.1 - pip3 install pymongo fi echo "end install python lib" From 0a06613e86b6400148d7e24ad0a8b54b91c21c5c Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 21 Jun 2022 17:16:55 +0800 Subject: [PATCH 015/298] Update centos.sh --- scripts/install/centos.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install/centos.sh b/scripts/install/centos.sh index 578a09c7a..cac3468fb 100755 --- a/scripts/install/centos.sh +++ b/scripts/install/centos.sh @@ -68,7 +68,7 @@ systemctl stop firewalld yum groupinstall -y "Development Tools" -yum install -y libevent libevent-devel libjpeg* libpng* gd* libxslt* unzip libmcrypt libmcrypt-devel +yum install -y libevent libevent-devel libjpeg* libpng* gd* libxslt* unzip yum install -y python-imaging libicu-devel zip bzip2-devel gcc libxml2 libxml2-dev pcre pcre-devel yum install -y libjpeg-devel libpng-devel libwebp libwebp-devel yum install -y lsof net-tools From 9b8f06a1a669d278289642dcca03ad09a10410a6 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 21 Jun 2022 17:23:38 +0800 Subject: [PATCH 016/298] Update centos.sh --- scripts/install/centos.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/install/centos.sh b/scripts/install/centos.sh index cac3468fb..600e6f0be 100755 --- a/scripts/install/centos.sh +++ b/scripts/install/centos.sh @@ -66,8 +66,7 @@ fi #安装时不开启 systemctl stop firewalld -yum groupinstall -y "Development Tools" - +# yum groupinstall -y "Development Tools" yum install -y libevent libevent-devel libjpeg* libpng* gd* libxslt* unzip yum install -y python-imaging libicu-devel zip bzip2-devel gcc libxml2 libxml2-dev pcre pcre-devel yum install -y libjpeg-devel libpng-devel libwebp libwebp-devel From 8a1153827916ab5ecf67082ec300285cd76c4878 Mon Sep 17 00:00:00 2001 From: xcsoft Date: Tue, 21 Jun 2022 17:34:32 +0800 Subject: [PATCH 017/298] fix: remove config file when uninstall --- plugins/xhprof/install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/xhprof/install.sh b/plugins/xhprof/install.sh index 14af37c44..938a854d7 100755 --- a/plugins/xhprof/install.sh +++ b/plugins/xhprof/install.sh @@ -26,6 +26,7 @@ Uninstall_xh() { rm -rf ${serverPath}/xhprof cd /tmp/xhprof && rm -rf *.xhprof + rm -f /www/server/web_conf/nginx/vhost/xhprof.conf echo '卸载完成' > $install_tmp } From 5c9914c2c495589ee2c946a648921c901cc1ffb8 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 21 Jun 2022 18:02:46 +0800 Subject: [PATCH 018/298] Update centos.sh --- scripts/install/centos.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/install/centos.sh b/scripts/install/centos.sh index 600e6f0be..773c41bf9 100755 --- a/scripts/install/centos.sh +++ b/scripts/install/centos.sh @@ -110,7 +110,17 @@ fi if [ -f /www/server/mdserver-web/bin/activate ];then cd /www/server/mdserver-web && source /www/server/mdserver-web/bin/activate && pip3 install -r /www/server/mdserver-web/requirements.txt + pip install --upgrade pip + pip3 install gunicorn==20.1.0 + pip3 install gevent==21.1.2 + pip3 install gevent-websocket==0.10.1 + pip3 install requests==2.20.0 + pip3 install flask-caching==1.10.1 + pip3 install python-socketio==4.2.0 + pip3 install psutil==5.9.1 + pip3 install Jinja==2.11.2 + pip3 install pymongo fi echo "end install python lib" From e12d77b9d74327d096353f00b7ce1b628c7cb15c Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 21 Jun 2022 18:18:42 +0800 Subject: [PATCH 019/298] Update lib.sh --- scripts/lib.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/lib.sh b/scripts/lib.sh index 63d453d9c..7f33fc0e7 100755 --- a/scripts/lib.sh +++ b/scripts/lib.sh @@ -244,17 +244,19 @@ echo -e "Install_Curl" >> ${libPath}/lib.pl } -_os=`uname` if grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then sudo ln -sf /bin/bash /bin/sh #sudo dpkg-reconfigure dash fi +_os=`uname` if [ ${_os} == "Darwin" ]; then OSNAME='macos' elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then OSNAME='centos' +elif grep -Eqi "Rocky" /etc/issue || grep -Eq "Rocky" /etc/*-release; then + OSNAME='rocky' elif grep -Eqi "Red Hat Enterprise Linux Server" /etc/issue || grep -Eq "Red Hat Enterprise Linux Server" /etc/*-release; then OSNAME='rhel' elif grep -Eqi "Aliyun" /etc/issue || grep -Eq "Aliyun" /etc/*-release; then @@ -292,7 +294,7 @@ elif [ "$OSNAME" == "ubuntu" ] || [ "$OSNAME" == "debian" ]; then apt install -y libffi-dev apt install -y cmake automake make - apt install -y php-common webp scons + apt install -y webp scons apt install -y lzma lzma-dev libunwind-dev apt install -y libpcre3 libpcre3-dev @@ -328,19 +330,17 @@ elif [ "$OSNAME" == "ubuntu" ] || [ "$OSNAME" == "debian" ]; then else yum install -y openldap openldap-devel libtirpc libtirpc-devel rpcgen - yum install -y bison re2c cmake yum install -y libmemcached libmemcached-devel yum install -y curl-devel yum install -y zlib zlib-devel + yum install -y libzip libzip-devel yum install -y pcre pcre-devel yum install -y icu libicu-devel autoconf yum install -y freetype freetype-devel yum install -y openssl openssl-devel - yum install -y libzip libzip-devel yum install -y graphviz libxml2 libxml2-devel - yum install -y sqlite-devel yum install -y oniguruma oniguruma-devel yum install -y ImageMagick ImageMagick-devel From 6a51c42b4087ff46432e5221445ed19ad6f7d04b Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 21 Jun 2022 18:28:57 +0800 Subject: [PATCH 020/298] Update centos.sh --- scripts/install/centos.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/install/centos.sh b/scripts/install/centos.sh index 773c41bf9..b16f71fc2 100755 --- a/scripts/install/centos.sh +++ b/scripts/install/centos.sh @@ -108,6 +108,7 @@ if [ ! -f /www/server/mdserver-web/bin/activate ];then sleep 5 fi +echo "start install python env lib" if [ -f /www/server/mdserver-web/bin/activate ];then cd /www/server/mdserver-web && source /www/server/mdserver-web/bin/activate && pip3 install -r /www/server/mdserver-web/requirements.txt @@ -122,7 +123,7 @@ if [ -f /www/server/mdserver-web/bin/activate ];then pip3 install Jinja==2.11.2 pip3 install pymongo fi - +echo "end install python env lib" echo "end install python lib" From eebe809664ad42fee585657a287c2ba99e065cd7 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 21 Jun 2022 18:35:23 +0800 Subject: [PATCH 021/298] Update centos.sh --- scripts/install/centos.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/install/centos.sh b/scripts/install/centos.sh index b16f71fc2..130fb0e68 100755 --- a/scripts/install/centos.sh +++ b/scripts/install/centos.sh @@ -120,7 +120,6 @@ if [ -f /www/server/mdserver-web/bin/activate ];then pip3 install flask-caching==1.10.1 pip3 install python-socketio==4.2.0 pip3 install psutil==5.9.1 - pip3 install Jinja==2.11.2 pip3 install pymongo fi echo "end install python env lib" From 2a1fef3d54aae8842f1145ccfa166b39c149632d Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 21 Jun 2022 18:38:38 +0800 Subject: [PATCH 022/298] Update centos.sh --- scripts/install/centos.sh | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/scripts/install/centos.sh b/scripts/install/centos.sh index 130fb0e68..7b7ca2422 100755 --- a/scripts/install/centos.sh +++ b/scripts/install/centos.sh @@ -103,16 +103,13 @@ pip3 install pymongo cd /www/server/mdserver-web && pip3 install -r /www/server/mdserver-web/requirements.txt -if [ ! -f /www/server/mdserver-web/bin/activate ];then - cd /www/server/mdserver-web && python3 -m venv . - sleep 5 -fi echo "start install python env lib" -if [ -f /www/server/mdserver-web/bin/activate ];then - cd /www/server/mdserver-web && source /www/server/mdserver-web/bin/activate && pip3 install -r /www/server/mdserver-web/requirements.txt - - pip install --upgrade pip +if [ ! -f /www/server/mdserver-web/bin/activate ];then + cd /www/server/mdserver-web && python3 -m venv . + source /www/server/mdserver-web/bin/activate + pip3 install -r /www/server/mdserver-web/requirements.txt + pip install --upgrade pip pip3 install gunicorn==20.1.0 pip3 install gevent==21.1.2 pip3 install gevent-websocket==0.10.1 @@ -122,6 +119,7 @@ if [ -f /www/server/mdserver-web/bin/activate ];then pip3 install psutil==5.9.1 pip3 install pymongo fi + echo "end install python env lib" echo "end install python lib" From 71c03e2440888e6181dba787cb8cc21d24836b2d Mon Sep 17 00:00:00 2001 From: xcsoft Date: Tue, 21 Jun 2022 11:05:57 +0000 Subject: [PATCH 023/298] fix: static site --- .gitignore | 2 +- plugins/openresty/install.sh | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 1f01fc2e6..aae13447a 100644 --- a/.gitignore +++ b/.gitignore @@ -129,4 +129,4 @@ pyvenv.cfg include data/api_login.txt data/sessions -data/ssl.pl +data/ssl.pl diff --git a/plugins/openresty/install.sh b/plugins/openresty/install.sh index 3676c3bc5..53ae30979 100755 --- a/plugins/openresty/install.sh +++ b/plugins/openresty/install.sh @@ -43,8 +43,7 @@ Install_openresty() --with-http_slice_module \ --with-http_stub_status_module && make && make install && \ echo "${VERSION}" > $serverPath/openresty/version.pl - - + echo "" > $serverPath/web_conf/nginx/enable-php-00.conf echo '安装完成' > $install_tmp } From c2324f6f4dcb12f860cf82f2b8b66928c84079ab Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 21 Jun 2022 19:20:28 +0800 Subject: [PATCH 024/298] Update centos.sh --- scripts/install/centos.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/install/centos.sh b/scripts/install/centos.sh index 7b7ca2422..4b9853bd3 100755 --- a/scripts/install/centos.sh +++ b/scripts/install/centos.sh @@ -105,16 +105,19 @@ cd /www/server/mdserver-web && pip3 install -r /www/server/mdserver-web/requirem echo "start install python env lib" + if [ ! -f /www/server/mdserver-web/bin/activate ];then cd /www/server/mdserver-web && python3 -m venv . source /www/server/mdserver-web/bin/activate - pip3 install -r /www/server/mdserver-web/requirements.txt pip install --upgrade pip + pip3 install -r /www/server/mdserver-web/requirements.txt pip3 install gunicorn==20.1.0 pip3 install gevent==21.1.2 pip3 install gevent-websocket==0.10.1 pip3 install requests==2.20.0 pip3 install flask-caching==1.10.1 + pip3 install flask-session==0.3.2 + pip3 install flask-sqlalchemy==2.3.2 pip3 install python-socketio==4.2.0 pip3 install psutil==5.9.1 pip3 install pymongo From af05cf9fe9c05420953782b548810154e453322d Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 21 Jun 2022 19:57:23 +0800 Subject: [PATCH 025/298] Update centos.sh --- scripts/install/centos.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/install/centos.sh b/scripts/install/centos.sh index 4b9853bd3..d970764f5 100755 --- a/scripts/install/centos.sh +++ b/scripts/install/centos.sh @@ -66,7 +66,7 @@ fi #安装时不开启 systemctl stop firewalld -# yum groupinstall -y "Development Tools" +yum groupinstall -y "Development Tools" yum install -y libevent libevent-devel libjpeg* libpng* gd* libxslt* unzip yum install -y python-imaging libicu-devel zip bzip2-devel gcc libxml2 libxml2-dev pcre pcre-devel yum install -y libjpeg-devel libpng-devel libwebp libwebp-devel @@ -81,15 +81,15 @@ if [ ! -f /usr/local/bin/pip3 ];then fi -echo "start install lib" +# echo "start install lib" cd /www/server/mdserver-web/scripts && bash lib.sh -echo "end install lib" +# echo "end install lib" chmod 755 /www/server/mdserver-web/data -echo "start install python lib" +# echo "start install python lib" pip install --upgrade pip pip3 install gunicorn==20.1.0 @@ -104,7 +104,7 @@ pip3 install pymongo cd /www/server/mdserver-web && pip3 install -r /www/server/mdserver-web/requirements.txt -echo "start install python env lib" +# echo "start install python env lib" if [ ! -f /www/server/mdserver-web/bin/activate ];then cd /www/server/mdserver-web && python3 -m venv . @@ -123,8 +123,8 @@ if [ ! -f /www/server/mdserver-web/bin/activate ];then pip3 install pymongo fi -echo "end install python env lib" -echo "end install python lib" +# echo "end install python env lib" +# echo "end install python lib" cd /www/server/mdserver-web && ./cli.sh start From a33c151ed891b4728adb754a334ee810c68e1bdc Mon Sep 17 00:00:00 2001 From: xcsoft Date: Tue, 21 Jun 2022 20:17:55 +0800 Subject: [PATCH 026/298] fix --- scripts/init.d/mw.tpl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/init.d/mw.tpl b/scripts/init.d/mw.tpl index 437b3a662..c59f86a7f 100755 --- a/scripts/init.d/mw.tpl +++ b/scripts/init.d/mw.tpl @@ -185,6 +185,9 @@ case "$1" in if [ -f $mw_path/data/admin_path.pl ];then auth_path=$(cat $mw_path/data/admin_path.pl) fi + if [ "$address" = "" ];then + address=$(curl -sS --connect-timeout 10 -m 60 https://v6r.ipip.net/?format=text) + fi echo -e "==================================================================" echo -e "\033[32mMW-Panel default info!\033[0m" @@ -197,4 +200,4 @@ case "$1" in echo -e "\033[33mrelease the following port (7200|888|80|443|20|21) in the security group\033[0m" echo -e "==================================================================" ;; -esac \ No newline at end of file +esac From 9d659d4748ffc8d6d4f0acacf5c8368b3b5a28a6 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 21 Jun 2022 22:53:54 +0800 Subject: [PATCH 027/298] oniguruma oniguruma-devel | centos8 fix --- scripts/install/centos.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/scripts/install/centos.sh b/scripts/install/centos.sh index d970764f5..1f51b4720 100755 --- a/scripts/install/centos.sh +++ b/scripts/install/centos.sh @@ -67,13 +67,23 @@ fi systemctl stop firewalld yum groupinstall -y "Development Tools" +yum install -y epel-release + +yum install -y oniguruma oniguruma-devel +#centos8 stream | use dnf +if [ "$?" != "0" ];then + yum install -y dnf dnf-plugins-core + dnf config-manager --set-enabled powertools + yum install -y oniguruma oniguruma-devel +fi + yum install -y libevent libevent-devel libjpeg* libpng* gd* libxslt* unzip yum install -y python-imaging libicu-devel zip bzip2-devel gcc libxml2 libxml2-dev pcre pcre-devel yum install -y libjpeg-devel libpng-devel libwebp libwebp-devel yum install -y lsof net-tools yum install -y ncurses-devel mysql-devel cmake yum install -y MySQL-python -yum install -y epel-release + if [ ! -f /usr/local/bin/pip3 ];then From 71c2c7259864cfab0bd67845e2a905b036684439 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 21 Jun 2022 23:10:19 +0800 Subject: [PATCH 028/298] debian python env --- scripts/install/debian.sh | 26 ++++++++++++++------------ scripts/update/debian.sh | 38 +++++++++++++++++++++++++------------- 2 files changed, 39 insertions(+), 25 deletions(-) diff --git a/scripts/install/debian.sh b/scripts/install/debian.sh index c3f2a19a4..59e96ff85 100644 --- a/scripts/install/debian.sh +++ b/scripts/install/debian.sh @@ -63,22 +63,14 @@ systemctl stop firewalld cd /www/server/mdserver-web/scripts && bash lib.sh chmod 755 /www/server/mdserver-web/data -# if [ ! -f /www/server/mdserver-web/bin/activate ];then -# cd /www/server/mdserver-web && python3 -m venv . -# fi - -if [ -f /www/server/mdserver-web/bin/activate ];then - pip install --upgrade pip - pip install --upgrade setuptools - cd /www/server/mdserver-web && source /www/server/mdserver-web/bin/activate && pip3 install -r /www/server/mdserver-web/requirements.txt -else - cd /www/server/mdserver-web && pip3 install -r /www/server/mdserver-web/requirements.txt -fi - if [ ! -f /usr/local/bin/pip3 ];then python3 -m pip install --upgrade pip setuptools wheel -i https://mirrors.aliyun.com/pypi/simple fi +pip install --upgrade pip +pip install --upgrade setuptools + +cd /www/server/mdserver-web && pip3 install -r /www/server/mdserver-web/requirements.txt pip3 install gunicorn==20.1.0 pip3 install gevent==21.1.2 @@ -89,6 +81,16 @@ pip3 install flask-socketio==5.2.0 pip3 install pymongo pip3 install psutil +if [ ! -f /www/server/mdserver-web/bin/activate ];then + cd /www/server/mdserver-web && python3 -m venv . +fi + +if [ -f /www/server/mdserver-web/bin/activate ];then + cd /www/server/mdserver-web && source /www/server/mdserver-web/bin/activate && pip3 install -r /www/server/mdserver-web/requirements.txt + pip install --upgrade pip + pip install --upgrade setuptools +fi + cd /www/server/mdserver-web && ./cli.sh start sleep 5 diff --git a/scripts/update/debian.sh b/scripts/update/debian.sh index a3eb1d282..41de8827f 100644 --- a/scripts/update/debian.sh +++ b/scripts/update/debian.sh @@ -10,24 +10,18 @@ cd /www/server/mdserver-web/scripts && bash lib.sh chmod 755 /www/server/mdserver-web/data #venv -# if [ ! -f /www/server/mdserver-web/bin/activate ];then -# cd /www/server/mdserver-web && python3 -m venv . -# fi +if [ ! -f /www/server/mdserver-web/bin/activate ];then + cd /www/server/mdserver-web && python3 -m venv . +fi if [ ! -f /usr/local/bin/pip3 ];then python3 -m pip install --upgrade pip setuptools wheel -i https://mirrors.aliyun.com/pypi/simple fi -if [ -f /www/server/mdserver-web/bin/activate ];then - pip install --upgrade pip - pip install --upgrade setuptools - cd /www/server/mdserver-web && source /www/server/mdserver-web/bin/activate && pip3 install -r /www/server/mdserver-web/requirements.txt -else - - cd /www/server/mdserver-web && pip3 install -r /www/server/mdserver-web/requirements.txt -fi - +pip install --upgrade pip +pip install --upgrade setuptools +cd /www/server/mdserver-web && pip3 install -r /www/server/mdserver-web/requirements.txt pip3 install gunicorn==20.1.0 pip3 install gevent==21.1.2 @@ -35,10 +29,28 @@ pip3 install gevent-websocket==0.10.1 pip3 install requests==2.20.0 pip3 install flask-caching==1.10.1 pip3 install flask-socketio==5.2.0 -pip3 install psutil pip3 install pymongo +pip3 install psutil +if [ ! -f /www/server/mdserver-web/bin/activate ];then + cd /www/server/mdserver-web && python3 -m venv . +fi + +if [ -f /www/server/mdserver-web/bin/activate ];then + cd /www/server/mdserver-web && source /www/server/mdserver-web/bin/activate && pip3 install -r /www/server/mdserver-web/requirements.txt + pip install --upgrade pip + pip install --upgrade setuptools + pip3 install gunicorn==20.1.0 + pip3 install gevent==21.1.2 + pip3 install gevent-websocket==0.10.1 + pip3 install requests==2.20.0 + pip3 install flask-caching==1.10.1 + pip3 install flask-socketio==5.2.0 + pip3 install pymongo + pip3 install psutil +fi + if [ -f /etc/init.d/mw ];then sh /etc/init.d/mw stop && rm -rf /www/server/mdserver-web/scripts/init.d/mw && rm -rf /etc/init.d/mw fi From e4a8cf06a57d964e1ec9838f8c22c30344590f87 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 21 Jun 2022 23:20:12 +0800 Subject: [PATCH 029/298] up --- scripts/install/debian.sh | 16 +++++++++++----- scripts/update/debian.sh | 5 ++--- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/scripts/install/debian.sh b/scripts/install/debian.sh index 59e96ff85..e5338111f 100644 --- a/scripts/install/debian.sh +++ b/scripts/install/debian.sh @@ -83,12 +83,18 @@ pip3 install psutil if [ ! -f /www/server/mdserver-web/bin/activate ];then cd /www/server/mdserver-web && python3 -m venv . -fi - -if [ -f /www/server/mdserver-web/bin/activate ];then - cd /www/server/mdserver-web && source /www/server/mdserver-web/bin/activate && pip3 install -r /www/server/mdserver-web/requirements.txt + cd /www/server/mdserver-web && source /www/server/mdserver-web/bin/activate pip install --upgrade pip - pip install --upgrade setuptools + pip3 install -r /www/server/mdserver-web/requirements.txt + pip install --upgrade setuptools + pip3 install gunicorn==20.1.0 + pip3 install gevent==21.1.2 + pip3 install gevent-websocket==0.10.1 + pip3 install requests==2.20.0 + pip3 install flask-caching==1.10.1 + pip3 install flask-socketio==5.2.0 + pip3 install pymongo + pip3 install psutil fi diff --git a/scripts/update/debian.sh b/scripts/update/debian.sh index 41de8827f..5029b36ca 100644 --- a/scripts/update/debian.sh +++ b/scripts/update/debian.sh @@ -35,11 +35,10 @@ pip3 install psutil if [ ! -f /www/server/mdserver-web/bin/activate ];then cd /www/server/mdserver-web && python3 -m venv . -fi + cd /www/server/mdserver-web && source /www/server/mdserver-web/bin/activate -if [ -f /www/server/mdserver-web/bin/activate ];then - cd /www/server/mdserver-web && source /www/server/mdserver-web/bin/activate && pip3 install -r /www/server/mdserver-web/requirements.txt pip install --upgrade pip + pip3 install -r /www/server/mdserver-web/requirements.txt pip install --upgrade setuptools pip3 install gunicorn==20.1.0 pip3 install gevent==21.1.2 From 0fbd43d0288660b6825c4cdbe1345986472d6c0c Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 21 Jun 2022 23:57:02 +0800 Subject: [PATCH 030/298] =?UTF-8?q?=E8=84=9A=E6=9C=AC=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/install/alma.sh | 47 ++++++++++++++-------------------- scripts/install/fedora.sh | 30 ++++++++-------------- scripts/install/rocky.sh | 41 +++++++++++++++--------------- scripts/install/ubuntu.sh | 52 ++++++++++++++++++-------------------- scripts/update/rocky.sh | 28 ++++++++++----------- scripts/update/ubuntu.sh | 53 +++++++++++++++++++-------------------- 6 files changed, 115 insertions(+), 136 deletions(-) diff --git a/scripts/install/alma.sh b/scripts/install/alma.sh index c396c9792..aae93ae40 100755 --- a/scripts/install/alma.sh +++ b/scripts/install/alma.sh @@ -69,50 +69,26 @@ fi systemctl stop firewalld yum groupinstall -y "Development Tools" +yum install -y epel-release yum install -y libevent libevent-devel libjpeg* libpng* gd* libxslt* unzip libmcrypt libmcrypt-devel yum install -y wget python-imaging libicu-devel zip bzip2-devel gcc libxml2 libxml2-dev libjpeg-devel libpng-devel libwebp libwebp-devel pcre pcre-devel yum install -y lsof net-tools yum install -y ncurses-devel mysql-devel cmake yum install -y MySQL-python -yum install -y epel-release -if [ ! -d /www/server/mdserver-web ];then - wget -O /tmp/master.zip https://codeload.github.com/midoks/mdserver-web/zip/master - cd /tmp && unzip /tmp/master.zip - mv /tmp/mdserver-web-master /www/server/mdserver-web - rm -rf /tmp/master.zip - rm -rf /tmp/mdserver-web-master -fi - -#if [ ! -f '/usr/bin/pip' ];then -# wget https://bootstrap.pypa.io/pip/2.7/get-pip.py -# python get-pip.py -# pip install --upgrade pip -# pip install pillow==6.2.2 -#fi - - -if [ ! -f /usr/local/bin/pip3 ];then - python3 -m pip install --upgrade pip setuptools wheel -i https://mirrors.aliyun.com/pypi/simple -fi cd /www/server/mdserver-web/scripts && bash lib.sh chmod 755 /www/server/mdserver-web/data -# if [ ! -f /www/server/mdserver-web/bin/activate ];then -# cd /www/server/mdserver-web && python3 -m venv . -# fi - -if [ -f /www/server/mdserver-web/bin/activate ];then - cd /www/server/mdserver-web && source /www/server/mdserver-web/bin/activate && pip3 install -r /www/server/mdserver-web/requirements.txt -else - cd /www/server/mdserver-web && pip3 install -r /www/server/mdserver-web/requirements.txt +if [ ! -f /usr/local/bin/pip3 ];then + python3 -m pip install --upgrade pip setuptools wheel -i https://mirrors.aliyun.com/pypi/simple fi pip install --upgrade pip +cd /www/server/mdserver-web && pip3 install -r /www/server/mdserver-web/requirements.txt pip3 install gunicorn==20.1.0 pip3 install gevent==21.1.2 pip3 install gevent-websocket==0.10.1 @@ -123,6 +99,21 @@ pip3 install psutil==5.9.1 pip3 install pymongo +if [ ! -f /www/server/mdserver-web/bin/activate ];then + cd /www/server/mdserver-web && python3 -m venv . + cd /www/server/mdserver-web && source /www/server/mdserver-web/bin/activate + pip install --upgrade pip + pip3 install -r /www/server/mdserver-web/requirements.txt + pip3 install gunicorn==20.1.0 + pip3 install gevent==21.1.2 + pip3 install gevent-websocket==0.10.1 + pip3 install requests==2.20.0 + pip3 install flask-caching==1.10.1 + pip3 install flask-socketio==5.2.0 + pip3 install psutil==5.9.1 + pip3 install pymongo +fi + cd /www/server/mdserver-web && ./cli.sh start sleep 5 diff --git a/scripts/install/fedora.sh b/scripts/install/fedora.sh index 1d75f4106..9074e7eef 100644 --- a/scripts/install/fedora.sh +++ b/scripts/install/fedora.sh @@ -66,6 +66,7 @@ systemctl stop firewalld yum groupinstall -y "Development Tools" +yum -y install epel-release yum install -y libevent libevent-devel libxslt* libjpeg* libpng* gd* zip libmcrypt libmcrypt-devel yum install -y gcc libffi-devel python-devel openssl-devel @@ -74,38 +75,29 @@ yum -y install wget python-devel python-imaging libicu-devel unzip bzip2-devel g yum -y install net-tools yum -y install ncurses-devel mysql-devel cmake yum -y install python-devel -yum -y install MySQL-python -yum -y install epel-release +yum -y install MySQL-python yum -y install python3-devel - -#if [ ! -f '/usr/bin/pip' ];then -# wget https://bootstrap.pypa.io/pip/2.7/get-pip.py -# python get-pip.py -# pip install --upgrade pip -# pip install pillow==6.2.2 -#fi - +cd /www/server/mdserver-web && pip3 install -r /www/server/mdserver-web/requirements.txt +cd /www/server/mdserver-web/scripts && bash lib.sh +chmod 755 /www/server/mdserver-web/data if [ ! -f /usr/local/bin/pip3 ];then python3 -m pip install --upgrade pip setuptools wheel -i https://mirrors.aliyun.com/pypi/simple fi - -cd /www/server/mdserver-web/scripts && bash lib.sh -chmod 755 /www/server/mdserver-web/data +pip install --upgrade pip +cd /www/server/mdserver-web && pip3 install -r /www/server/mdserver-web/requirements.txt if [ ! -f /www/server/mdserver-web/bin/activate ];then cd /www/server/mdserver-web && python3 -m venv . + cd /www/server/mdserver-web && source /www/server/mdserver-web/bin/activate + pip install --upgrade pip + pip3 install -r /www/server/mdserver-web/requirements.txt fi + - -if [ -f /www/server/mdserver-web/bin/activate ];then - cd /www/server/mdserver-web && source /www/server/mdserver-web/bin/activate && pip3 install -r /www/server/mdserver-web/requirements.txt -else - cd /www/server/mdserver-web && pip3 install -r /www/server/mdserver-web/requirements.txt -fi cd /www/server/mdserver-web && ./cli.sh start sleep 5 diff --git a/scripts/install/rocky.sh b/scripts/install/rocky.sh index f816a499b..b4621abeb 100644 --- a/scripts/install/rocky.sh +++ b/scripts/install/rocky.sh @@ -68,20 +68,17 @@ fi systemctl stop firewalld yum groupinstall -y "Development Tools" +yum install -y epel-release yum install -y libevent libevent-devel libjpeg* libpng* gd* libxslt* unzip libmcrypt libmcrypt-devel yum install -y wget python-imaging libicu-devel zip bzip2-devel gcc libxml2 libxml2-dev libjpeg-devel libpng-devel libwebp libwebp-devel pcre pcre-devel yum install -y lsof net-tools yum install -y ncurses-devel mysql-devel cmake yum install -y MySQL-python -yum install -y epel-release -#if [ ! -f '/usr/bin/pip' ];then -# wget https://bootstrap.pypa.io/pip/2.7/get-pip.py -# python get-pip.py -# pip install --upgrade pip -# pip install pillow==6.2.2 -#fi + +cd /www/server/mdserver-web/scripts && bash lib.sh +chmod 755 /www/server/mdserver-web/data if [ ! -f /usr/local/bin/pip3 ];then @@ -89,21 +86,8 @@ if [ ! -f /usr/local/bin/pip3 ];then fi -cd /www/server/mdserver-web/scripts && bash lib.sh -chmod 755 /www/server/mdserver-web/data - - -if [ ! -f /www/server/mdserver-web/bin/activate ];then - cd /www/server/mdserver-web && python3 -m venv . -fi - -if [ -f /www/server/mdserver-web/bin/activate ];then - cd /www/server/mdserver-web && source /www/server/mdserver-web/bin/activate && pip3 install -r /www/server/mdserver-web/requirements.txt -else - cd /www/server/mdserver-web && pip3 install -r /www/server/mdserver-web/requirements.txt -fi - pip install --upgrade pip +cd /www/server/mdserver-web && pip3 install -r /www/server/mdserver-web/requirements.txt pip3 install gunicorn==20.1.0 pip3 install gevent==21.1.2 pip3 install gevent-websocket==0.10.1 @@ -114,6 +98,21 @@ pip3 install psutil==5.9.1 pip3 install pymongo +if [ ! -f /www/server/mdserver-web/bin/activate ];then + cd /www/server/mdserver-web && python3 -m venv . + cd /www/server/mdserver-web && source /www/server/mdserver-web/bin/activate + pip install --upgrade pip + pip3 install -r /www/server/mdserver-web/requirements.txt + pip3 install gunicorn==20.1.0 + pip3 install gevent==21.1.2 + pip3 install gevent-websocket==0.10.1 + pip3 install requests==2.20.0 + pip3 install flask-caching==1.10.1 + pip3 install python-socketio==4.2.0 + pip3 install psutil==5.9.1 + pip3 install pymongo +fi + cd /www/server/mdserver-web && ./cli.sh start sleep 5 diff --git a/scripts/install/ubuntu.sh b/scripts/install/ubuntu.sh index e31ddb5ea..9bec0dbdd 100644 --- a/scripts/install/ubuntu.sh +++ b/scripts/install/ubuntu.sh @@ -66,43 +66,41 @@ if [ ! -f /usr/local/bin/pip3 ];then python3 -m pip install --upgrade pip setuptools wheel -i https://mirrors.aliyun.com/pypi/simple fi -# cd /www/server/mdserver-web && pip3 install -r /www/server/mdserver-web/requirements.txt -# pip install --upgrade pip -# pip install --upgrade setuptools -# pip3 install gunicorn==20.1.0 -# pip3 install gevent==21.1.2 -# pip3 install gevent-websocket==0.10.1 -# pip3 install requests==2.20.0 -# pip3 install flask-caching==1.10.1 -# pip3 install flask-socketio==5.2.0 -# pip3 install flask-session==0.3.2 -# pip3 install pymongo -# pip3 install psutil - - -# if [ ! -f /www/server/mdserver-web/bin/activate ];then -# cd /www/server/mdserver-web && python3 -m venv . -# fi - -if [ -f /www/server/mdserver-web/bin/activate ];then - python -m pip install --upgrade pip - cd /www/server/mdserver-web && source /www/server/mdserver-web/bin/activate && pip3 install -r /www/server/mdserver-web/requirements.txt -else - cd /www/server/mdserver-web && pip3 install -r /www/server/mdserver-web/requirements.txt -fi - +pip install --upgrade pip +cd /www/server/mdserver-web && pip3 install -r /www/server/mdserver-web/requirements.txt +pip install --upgrade setuptools pip3 install gunicorn==20.1.0 -pip3 install gevent==20.9.0 +pip3 install gevent==21.1.2 pip3 install gevent-websocket==0.10.1 pip3 install requests==2.20.0 pip3 install flask-caching==1.10.1 -#ubuntu 20 need pip3 install flask-socketio==5.2.0 pip3 install flask-session==0.3.2 pip3 install pymongo pip3 install psutil +if [ ! -f /www/server/mdserver-web/bin/activate ];then + cd /www/server/mdserver-web && python3 -m venv . +fi + +if [ -f /www/server/mdserver-web/bin/activate ];then + cd /www/server/mdserver-web && source /www/server/mdserver-web/bin/activate + pip install --upgrade pip + pip3 install -r /www/server/mdserver-web/requirements.txt + pip3 install gunicorn==20.1.0 + pip3 install gevent==20.9.0 + pip3 install gevent-websocket==0.10.1 + pip3 install requests==2.20.0 + pip3 install flask-caching==1.10.1 + #ubuntu 20 need + pip3 install flask-socketio==5.2.0 + pip3 install flask-session==0.3.2 + pip3 install pymongo + pip3 install psutil +fi + + cd /www/server/mdserver-web && ./cli.sh start sleep 5 diff --git a/scripts/update/rocky.sh b/scripts/update/rocky.sh index bca02d51a..71c725bc0 100755 --- a/scripts/update/rocky.sh +++ b/scripts/update/rocky.sh @@ -27,23 +27,23 @@ if [ ! -f /www/server/mdserver-web/bin/activate ];then cd /www/server/mdserver-web && python3 -m venv . fi +cd /www/server/mdserver-web && pip3 install -r /www/server/mdserver-web/requirements.txt -if [ -f /www/server/mdserver-web/bin/activate ];then - cd /www/server/mdserver-web && source /www/server/mdserver-web/bin/activate && pip3 install -r /www/server/mdserver-web/requirements.txt -else - cd /www/server/mdserver-web && pip3 install -r /www/server/mdserver-web/requirements.txt +if [ ! -f /www/server/mdserver-web/bin/activate ];then + cd /www/server/mdserver-web && python3 -m venv . + cd /www/server/mdserver-web && source /www/server/mdserver-web/bin/activate + pip install --upgrade pip + pip3 install -r /www/server/mdserver-web/requirements.txt + pip3 install gunicorn==20.1.0 + pip3 install gevent==21.1.2 + pip3 install gevent-websocket==0.10.1 + pip3 install requests==2.20.0 + pip3 install flask-caching==1.10.1 + pip3 install python-socketio==4.2.0 + pip3 install psutil==5.9.1 + pip3 install pymongo fi -pip install --upgrade pip -pip3 install gunicorn==20.1.0 -pip3 install gevent==21.1.2 -pip3 install gevent-websocket==0.10.1 -pip3 install requests==2.20.0 -pip3 install flask-caching==1.10.1 -pip3 install python-socketio==4.2.0 -pip3 install psutil==5.9.1 -pip3 install pymongo - if [ -f /etc/init.d/mw ]; then sh /etc/init.d/mw stop && rm -rf /www/server/mdserver-web/scripts/init.d/mw && rm -rf /etc/init.d/mw diff --git a/scripts/update/ubuntu.sh b/scripts/update/ubuntu.sh index 1fb1bf7cc..fe9654068 100644 --- a/scripts/update/ubuntu.sh +++ b/scripts/update/ubuntu.sh @@ -13,34 +13,11 @@ if [ ! -f /usr/local/bin/pip3 ];then python3 -m pip install --upgrade pip setuptools wheel -i https://mirrors.aliyun.com/pypi/simple fi -# cd /www/server/mdserver-web && pip3 install -r /www/server/mdserver-web/requirements.txt - -# pip install --upgrade pip -# pip install --upgrade setuptools -# pip3 install gunicorn==20.1.0 -# pip3 install gevent==21.1.2 -# pip3 install gevent-websocket==0.10.1 -# pip3 install requests==2.20.0 -# pip3 install flask-caching==1.10.1 -# pip3 install flask-socketio==5.2.0 -# pip3 install flask-session==0.3.2 -# pip3 install pymongo -# pip3 install psutil - -#venv -# if [ ! -f /www/server/mdserver-web/bin/activate ];then -# cd /www/server/mdserver-web && python3 -m venv . -# fi - -if [ -f /www/server/mdserver-web/bin/activate ];then - pip install --upgrade pip - cd /www/server/mdserver-web && source /www/server/mdserver-web/bin/activate && pip3 install -r /www/server/mdserver-web/requirements.txt -else - cd /www/server/mdserver-web && pip3 install -r /www/server/mdserver-web/requirements.txt -fi - +pip install --upgrade pip +cd /www/server/mdserver-web && pip3 install -r /www/server/mdserver-web/requirements.txt +pip install --upgrade setuptools pip3 install gunicorn==20.1.0 -pip3 install gevent==20.9.0 +pip3 install gevent==21.1.2 pip3 install gevent-websocket==0.10.1 pip3 install requests==2.20.0 pip3 install flask-caching==1.10.1 @@ -49,6 +26,28 @@ pip3 install flask-session==0.3.2 pip3 install pymongo pip3 install psutil + +if [ ! -f /www/server/mdserver-web/bin/activate ];then + cd /www/server/mdserver-web && python3 -m venv . +fi + +if [ -f /www/server/mdserver-web/bin/activate ];then + cd /www/server/mdserver-web && source /www/server/mdserver-web/bin/activate + pip install --upgrade pip + pip3 install -r /www/server/mdserver-web/requirements.txt + pip3 install gunicorn==20.1.0 + pip3 install gevent==20.9.0 + pip3 install gevent-websocket==0.10.1 + pip3 install requests==2.20.0 + pip3 install flask-caching==1.10.1 + #ubuntu 20 need + pip3 install flask-socketio==5.2.0 + pip3 install flask-session==0.3.2 + pip3 install pymongo + pip3 install psutil +fi + + if [ -f /etc/init.d/mw ];then sh /etc/init.d/mw stop && rm -rf /www/server/mdserver-web/scripts/init.d/mw && rm -rf /etc/init.d/mw fi From 399f57f5545cbde6c42f3d21fe04a3d46a4ffb72 Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 22 Jun 2022 01:06:59 +0800 Subject: [PATCH 031/298] alma fix --- scripts/install/alma.sh | 1 + scripts/update/alma.sh | 37 +++++++++++++++++++------------------ 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/scripts/install/alma.sh b/scripts/install/alma.sh index aae93ae40..c4e669562 100755 --- a/scripts/install/alma.sh +++ b/scripts/install/alma.sh @@ -87,6 +87,7 @@ if [ ! -f /usr/local/bin/pip3 ];then python3 -m pip install --upgrade pip setuptools wheel -i https://mirrors.aliyun.com/pypi/simple fi +sed -i "/mysqlclient/d" /www/server/mdserver-web/requirements.txt pip install --upgrade pip cd /www/server/mdserver-web && pip3 install -r /www/server/mdserver-web/requirements.txt pip3 install gunicorn==20.1.0 diff --git a/scripts/update/alma.sh b/scripts/update/alma.sh index a5f2cf78f..5b8b20721 100755 --- a/scripts/update/alma.sh +++ b/scripts/update/alma.sh @@ -11,7 +11,6 @@ fi sed -i 's#SELINUX=enforcing#SELINUX=disabled#g' /etc/selinux/config -yum install -y curl-devel libmcrypt libmcrypt-devel python3-devel cd /www/server/mdserver-web/scripts && bash lib.sh chmod 755 /www/server/mdserver-web/data @@ -21,27 +20,29 @@ if [ ! -f /usr/local/bin/pip3 ];then python3 -m pip install --upgrade pip setuptools wheel -i https://mirrors.aliyun.com/pypi/simple fi + +sed -i "/mysqlclient/d" /www/server/mdserver-web/requirements.txt +pip install --upgrade pip +cd /www/server/mdserver-web && pip3 install -r /www/server/mdserver-web/requirements.txt +pip3 install flask-socketio==5.2.0 + #venv -# if [ ! -f /www/server/mdserver-web/bin/activate ];then -# cd /www/server/mdserver-web && python3 -m venv . -# fi +if [ ! -f /www/server/mdserver-web/bin/activate ];then + cd /www/server/mdserver-web && python3 -m venv . + cd /www/server/mdserver-web && source /www/server/mdserver-web/bin/activate + pip install --upgrade pip + pip3 install -r /www/server/mdserver-web/requirements.txt - -if [ -f /www/server/mdserver-web/bin/activate ];then - cd /www/server/mdserver-web && source /www/server/mdserver-web/bin/activate && pip3 install -r /www/server/mdserver-web/requirements.txt -else - cd /www/server/mdserver-web && pip3 install -r /www/server/mdserver-web/requirements.txt + pip3 install gunicorn==20.1.0 + pip3 install gevent==21.1.2 + pip3 install gevent-websocket==0.10.1 + pip3 install requests==2.20.0 + pip3 install flask-caching==1.10.1 + pip3 install flask-socketio==5.2.0 + pip3 install psutil==5.9.1 + pip3 install pymongo fi -pip install --upgrade pip -pip3 install gunicorn==20.1.0 -pip3 install gevent==21.1.2 -pip3 install gevent-websocket==0.10.1 -pip3 install requests==2.20.0 -pip3 install flask-caching==1.10.1 -pip3 install python-socketio==4.2.0 -pip3 install psutil==5.9.1 -pip3 install pymongo if [ -f /etc/init.d/mw ]; then From 81cdcd3fd024570146f58193993f9e76e24e84ff Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 22 Jun 2022 01:10:16 +0800 Subject: [PATCH 032/298] almalinux warning fix --- scripts/install.sh | 2 +- scripts/install_cn.sh | 2 +- scripts/install_dev.sh | 2 +- scripts/update.sh | 2 +- scripts/update_cn.sh | 2 +- scripts/update_dev.sh | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index 25f0f0f00..c2de403f3 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -1,7 +1,7 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH -LANG=en_US.UTF-8 +# LANG=en_US.UTF-8 is64bit=`getconf LONG_BIT` if [ -f /etc/motd ];then diff --git a/scripts/install_cn.sh b/scripts/install_cn.sh index eae9bc696..15e878001 100755 --- a/scripts/install_cn.sh +++ b/scripts/install_cn.sh @@ -1,7 +1,7 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH -LANG=en_US.UTF-8 +# LANG=en_US.UTF-8 is64bit=`getconf LONG_BIT` if [ -f /etc/motd ];then diff --git a/scripts/install_dev.sh b/scripts/install_dev.sh index 6a58f0d3d..4b914988f 100755 --- a/scripts/install_dev.sh +++ b/scripts/install_dev.sh @@ -1,7 +1,7 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH -LANG=en_US.UTF-8 +# LANG=en_US.UTF-8 is64bit=`getconf LONG_BIT` if [ -f /etc/motd ];then diff --git a/scripts/update.sh b/scripts/update.sh index 00fa5321d..8df4e7b61 100755 --- a/scripts/update.sh +++ b/scripts/update.sh @@ -1,7 +1,7 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH -LANG=en_US.UTF-8 +# LANG=en_US.UTF-8 is64bit=`getconf LONG_BIT` startTime=`date +%s` diff --git a/scripts/update_cn.sh b/scripts/update_cn.sh index 76cf4ac30..095210cbc 100755 --- a/scripts/update_cn.sh +++ b/scripts/update_cn.sh @@ -1,7 +1,7 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH -LANG=en_US.UTF-8 +# LANG=en_US.UTF-8 is64bit=`getconf LONG_BIT` startTime=`date +%s` diff --git a/scripts/update_dev.sh b/scripts/update_dev.sh index e3bf41f4a..5852e81c6 100755 --- a/scripts/update_dev.sh +++ b/scripts/update_dev.sh @@ -1,7 +1,7 @@ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH -LANG=en_US.UTF-8 +# LANG=en_US.UTF-8 is64bit=`getconf LONG_BIT` startTime=`date +%s` From 2bdb12d55cfee2086a35dc112bf408527e9940de Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 22 Jun 2022 01:12:45 +0800 Subject: [PATCH 033/298] =?UTF-8?q?=E9=87=8A=E6=94=BE=E5=86=85=E5=AD=98?= =?UTF-8?q?=E8=84=9A=E6=9C=AC=20+=2080,81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/rememory.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/rememory.sh b/scripts/rememory.sh index eb55fcec4..1e09ee1d6 100755 --- a/scripts/rememory.sh +++ b/scripts/rememory.sh @@ -61,6 +61,14 @@ if [ -f $rootPath"/php/init.d/php74" ];then $rootPath"/php/init.d/php74" reload fi +if [ -f $rootPath"/php/init.d/php80" ];then + $rootPath"/php/init.d/php74" reload +fi + +if [ -f $rootPath"/php/init.d/php81" ];then + $rootPath"/php/init.d/php74" reload +fi + if [ -f $rootPath"/openresty/nginx/sbin/nginx" ];then $rootPath"/openresty/nginx/sbin/nginx" -s reload fi From ecf2779800bac75a14f872c8ef4cf96cec3d06f5 Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 22 Jun 2022 01:39:59 +0800 Subject: [PATCH 034/298] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8f0476f09..47a5357d6 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,7 @@ curl -fsSL https://raw.githubusercontent.com/midoks/mdserver-web/dev/scripts/up 如果你自己写了插件,想分享出来,也可以提Issue。 ``` -- 开发文档 - https://github.com/midoks/mdserver-web/wiki/%E6%8F%92%E4%BB%B6%E5%BC%80%E5%8F%91 +- 开发文档 - https://github.com/midoks/mdserver-web/wiki/插件开发 - 插件地址 - https://github.com/mw-plugin - 例子 - https://github.com/mw-plugin/simple-plugin From 9ab39130e511956c8354a4192f5c279912cfcaee Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 22 Jun 2022 02:35:45 +0800 Subject: [PATCH 035/298] Update alma.sh --- scripts/install/alma.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/install/alma.sh b/scripts/install/alma.sh index c4e669562..640279487 100755 --- a/scripts/install/alma.sh +++ b/scripts/install/alma.sh @@ -71,6 +71,14 @@ systemctl stop firewalld yum groupinstall -y "Development Tools" yum install -y epel-release +yum install -y oniguruma oniguruma-devel +#use dnf +if [ "$?" != "0" ];then + yum install -y dnf dnf-plugins-core + dnf config-manager --set-enabled powertools + yum install -y oniguruma oniguruma-devel +fi + yum install -y libevent libevent-devel libjpeg* libpng* gd* libxslt* unzip libmcrypt libmcrypt-devel yum install -y wget python-imaging libicu-devel zip bzip2-devel gcc libxml2 libxml2-dev libjpeg-devel libpng-devel libwebp libwebp-devel pcre pcre-devel yum install -y lsof net-tools From 1f2483b4ef0e1f3bd75e04dea8a50d35aad7f81e Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 22 Jun 2022 02:52:07 +0800 Subject: [PATCH 036/298] Update centos.sh --- scripts/install/centos.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install/centos.sh b/scripts/install/centos.sh index 1f51b4720..99fec794a 100755 --- a/scripts/install/centos.sh +++ b/scripts/install/centos.sh @@ -78,7 +78,7 @@ if [ "$?" != "0" ];then fi yum install -y libevent libevent-devel libjpeg* libpng* gd* libxslt* unzip -yum install -y python-imaging libicu-devel zip bzip2-devel gcc libxml2 libxml2-dev pcre pcre-devel +yum install -y python-imaging libicu-devel zip bzip2-devel gcc libxml2 libxml2-devel pcre pcre-devel yum install -y libjpeg-devel libpng-devel libwebp libwebp-devel yum install -y lsof net-tools yum install -y ncurses-devel mysql-devel cmake From 269fd07c5fdc5e8be0d924c1ec768d4ec4934d19 Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 22 Jun 2022 03:29:22 +0800 Subject: [PATCH 037/298] =?UTF-8?q?alma=20=E5=AE=89=E8=A3=85=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/install/alma.sh | 42 +++++++++++++++++------------------------ scripts/update/alma.sh | 1 - 2 files changed, 17 insertions(+), 26 deletions(-) diff --git a/scripts/install/alma.sh b/scripts/install/alma.sh index 640279487..da07497cf 100755 --- a/scripts/install/alma.sh +++ b/scripts/install/alma.sh @@ -5,19 +5,13 @@ LANG=C.UTF-8 -if [ ! -f /usr/bin/applydeltarpm ];then - yum -y provides '*/applydeltarpm' - yum -y install deltarpm -fi - - setenforce 0 sed -i 's#SELINUX=enforcing#SELINUX=disabled#g' /etc/selinux/config -yum install -y wget lsof crontabs -yum install -y python3-devel -yum install -y python-devel -yum install -y vixie-cron +dnf install -y wget lsof +dnf install -y python3-devel +dnf install -y python-devel +dnf install -y crontabs #https need @@ -68,22 +62,20 @@ fi #安装时不开启 systemctl stop firewalld -yum groupinstall -y "Development Tools" -yum install -y epel-release +dnf upgrade -y +dnf autoremove -y -yum install -y oniguruma oniguruma-devel -#use dnf -if [ "$?" != "0" ];then - yum install -y dnf dnf-plugins-core - dnf config-manager --set-enabled powertools - yum install -y oniguruma oniguruma-devel -fi +dnf groupinstall -y "Development Tools" +dnf install -y epel-release -yum install -y libevent libevent-devel libjpeg* libpng* gd* libxslt* unzip libmcrypt libmcrypt-devel -yum install -y wget python-imaging libicu-devel zip bzip2-devel gcc libxml2 libxml2-dev libjpeg-devel libpng-devel libwebp libwebp-devel pcre pcre-devel -yum install -y lsof net-tools -yum install -y ncurses-devel mysql-devel cmake -yum install -y MySQL-python +dnf install -y oniguruma +dnf --enablerepo=crb install oniguruma-devel + +dnf install -y libevent libevent-devel libjpeg* libpng* gd* libxslt* unzip libmcrypt libmcrypt-devel +dnf install -y wget libicu-devel zip bzip2-devel gcc libxml2 libxml2-devel libjpeg-devel libpng-devel libwebp libwebp-devel pcre pcre-devel +dnf install -y lsof net-tools +dnf install -y ncurses-devel cmake +dnf --enablerepo=crb install mysql-devel @@ -95,7 +87,7 @@ if [ ! -f /usr/local/bin/pip3 ];then python3 -m pip install --upgrade pip setuptools wheel -i https://mirrors.aliyun.com/pypi/simple fi -sed -i "/mysqlclient/d" /www/server/mdserver-web/requirements.txt + pip install --upgrade pip cd /www/server/mdserver-web && pip3 install -r /www/server/mdserver-web/requirements.txt pip3 install gunicorn==20.1.0 diff --git a/scripts/update/alma.sh b/scripts/update/alma.sh index 5b8b20721..fa4542ef1 100755 --- a/scripts/update/alma.sh +++ b/scripts/update/alma.sh @@ -21,7 +21,6 @@ if [ ! -f /usr/local/bin/pip3 ];then fi -sed -i "/mysqlclient/d" /www/server/mdserver-web/requirements.txt pip install --upgrade pip cd /www/server/mdserver-web && pip3 install -r /www/server/mdserver-web/requirements.txt pip3 install flask-socketio==5.2.0 From e278c2813490c4fd2e7874d29169ec2d61037676 Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 22 Jun 2022 10:25:53 +0800 Subject: [PATCH 038/298] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=B5=84=E5=8A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 ++ route/static/img/wx_zz.jpg | Bin 0 -> 60575 bytes 2 files changed, 2 insertions(+) create mode 100644 route/static/img/wx_zz.jpg diff --git a/README.md b/README.md index 47a5357d6..020f3e3c7 100644 --- a/README.md +++ b/README.md @@ -96,6 +96,8 @@ curl -fsSL https://raw.githubusercontent.com/midoks/mdserver-web/dev/scripts/in curl -fsSL https://raw.githubusercontent.com/midoks/mdserver-web/dev/scripts/update_dev.sh | bash ``` +### 微信赞助 +- [![截图](/route/static/wx_zz.jpg)](/route/static/wx_zz.jpg) ### 无图不真相 diff --git a/route/static/img/wx_zz.jpg b/route/static/img/wx_zz.jpg new file mode 100644 index 0000000000000000000000000000000000000000..4d3c6105b8a4d6f5c7ceb7d8b791fa6f460a74a8 GIT binary patch literal 60575 zcmeFZ2UJu|wg!3{kc>#qw2~1C5+o;)B$9I$kt`rNXNeL7B#7jkTO{WkB}XMglabKG z1{!#+|J*w>_r15~zW3(N+_m0ctm;0ePjR|ypQ>GZfBV~Y`~7wqxc6K}UIqYx06-4; z2i&dzI@0b|<^Z6m2s{J;024p~5dx^lBM|Zr2(<#xejft>6Y?DZP%}Y)y_$*gA6L=* zGg1F~{Hx*Z9w4A%Y42?BWNH8QJ`V>MAn;UP5$)IAkmdI=>%a0bt}Wx&!)Me*YWt1%!f%b_X2;6AK#$*`WF! z@~5MsqM)JPx%2C5Kt9Op02;v^!UvBf(TP+|Fz6hJxdUReFzKIGw3Dcf9WwB|aty@6 zCM6@Mpk!oXW?_BE%lCv|Ku}2PnY4_oocwcj4NWa=9bG-s*JkDxmR8nI&MvNQ?jD{& z?}9@@!@?ut;y)%NCMADL$t2 z>_0p9*M7|bQULnzf{l)jeHR-W`!3;KWFaIY{8h-P$$l5=zZAOPh51)`^q=Jxc@q!@ z1_ll`4iPps5eJwO%<=!Y+%6!8rQGc-fQt%34klCrKpeQtk6_6}`Lq7t$^id%^tX)A zwsj_K5+94T>B1IdWOt+~*G5Rfu@G;FukR|Kl+zZmg;$Q1+1no6tHMilp}|BvT=&>d z;OX=sP+ommFi*=iTExqho#Q^P$x0WZK1mR(avk#R#$EOn@WwyPy;J-U^8HQg<~zUh zwp##Otkdik5TU;XS}@=$e_s1jE`N@RKj*`ry5LV8`Tvvk;S;^wM+R#WSqbzzfV{>& zg#G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YV_I@(b*2dq{yq<~?+xJHpYNKB=vJPn%580rQ#t>mulGQb7ZnUzpul~rYrzPU9B`RPc8>^sEp zRo5vkp6o-xSa?8O(Gj}{H)4wHB}`_!cUAnGAkVuMeRGbSnTTg9Qz|x@;MSg?vmnk_ z8GSs}nx#1994o#D;RUu5l2(t2hp&416`~U1Wu^W+kHQx~9oK?vYB6W|z8v$2U`HoA zT3L1aio`40udU?;m;{I!gq$C8d{7h>8Pl2ry|1_BH`I1(4}W8_*;T5@D52=8SYN{GZyIY}uW%8fy`=2GZDn*a?A9f( zVOi|h(a7M6va@b^-F?hmrw}niypg~f;6cBT$&o4Kqul6cA)#=9`zhRVL+P?}+Z#BI z+axhTTfiySNib5b2sQTv*V->y77GWN^X&SnFJ36d)BDVjY=krmb}F8nG${ltSeDhM zcX{~VQLE^zad*xi#uwTQPqSt2SsyF9g=}xvx_tJjSj`0{+_e6P+l78-ySre$Yc+GJ z0j@HG#Hk@GmLw5q6I4jSuF}cfL}ZmPlUiN6u;7&o%+TL<5dUx32<9IT8T?#T|KrWx fU+I4T9DnOy=^y@#vHb1o`4K7p?dtg Date: Wed, 22 Jun 2022 10:34:50 +0800 Subject: [PATCH 039/298] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E8=B5=84=E5=8A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- route/static/img/{wx_zz.jpg => weixin_zz.jpg} | Bin 2 files changed, 1 insertion(+), 1 deletion(-) rename route/static/img/{wx_zz.jpg => weixin_zz.jpg} (100%) diff --git a/README.md b/README.md index 020f3e3c7..12b58fae4 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,7 @@ curl -fsSL https://raw.githubusercontent.com/midoks/mdserver-web/dev/scripts/up ``` ### 微信赞助 -- [![截图](/route/static/wx_zz.jpg)](/route/static/wx_zz.jpg) +- [![截图](/route/static/img/weixin_zz.jpg)](/route/static/img/weixin_zz.jpg) ### 无图不真相 diff --git a/route/static/img/wx_zz.jpg b/route/static/img/weixin_zz.jpg similarity index 100% rename from route/static/img/wx_zz.jpg rename to route/static/img/weixin_zz.jpg From e425da26566e7d2edbb2bfd5ec1c69243a26742f Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 22 Jun 2022 12:01:42 +0800 Subject: [PATCH 040/298] Delete check-ssh.sh --- plugins/ssh-no-login/check-ssh.sh | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100755 plugins/ssh-no-login/check-ssh.sh diff --git a/plugins/ssh-no-login/check-ssh.sh b/plugins/ssh-no-login/check-ssh.sh deleted file mode 100755 index 8a648ef10..000000000 --- a/plugins/ssh-no-login/check-ssh.sh +++ /dev/null @@ -1,21 +0,0 @@ -#! /bin/bash -#禁止弱口令登录改良版 - -cat /var/log/secure|awk '/Failed/{print $(NF-3)}'|sort|uniq -c|awk '{print $2"="$1;}' > black.txt #尝试登录的次数和ip - -DEFINE="5" #单个ip尝试登录最大值 - -for i in `cat /root/black.txt` -do - - IP=`echo $i |awk -F= '{print $1}'` - NUM=`echo $i|awk -F= '{print $2}'` - - if [ $NUM -gt $DEFINE ]; then - grep $IP /etc/hosts.deny > /dev/null - - if [ $? -gt 0 ]; then - echo "sshd:$IP" >> /etc/hosts.deny #扔到hosts文件中 - fi - fi -done \ No newline at end of file From f4cc17cf3ae316e3f390c0f0d935e9d15bcc134b Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 22 Jun 2022 12:03:11 +0800 Subject: [PATCH 041/298] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 12b58fae4..2c908a929 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,7 @@ curl -fsSL https://raw.githubusercontent.com/midoks/mdserver-web/dev/scripts/up ``` ### 微信赞助 -- [![截图](/route/static/img/weixin_zz.jpg)](/route/static/img/weixin_zz.jpg) +[![截图](/route/static/img/weixin_zz.jpg)](/route/static/img/weixin_zz.jpg) ### 无图不真相 From 5227e66531235c5b570cbf1c3d56d1a63000b93f Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 22 Jun 2022 13:19:00 +0800 Subject: [PATCH 042/298] =?UTF-8?q?=E4=BC=98=E5=8C=96openresty=E9=87=8D?= =?UTF-8?q?=E5=90=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- class/core/mw.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/class/core/mw.py b/class/core/mw.py index 745d1c5d1..5629d57ac 100755 --- a/class/core/mw.py +++ b/class/core/mw.py @@ -111,9 +111,22 @@ def isInstalledWeb(): def restartWeb(): - if isInstalledWeb(): - initd = getServerDir() + '/openresty/init.d/openresty' + if not isInstalledWeb(): + return False + + # systemd + systemd = '/lib/systemd/system/openresty.service' + if os.path.exists(systemd): + execShell('systemctl restart openresty') + return True + + # initd + initd = getServerDir() + '/openresty/init.d/openresty' + if os.path.exists(initd): execShell(initd + ' ' + 'restart') + return True + + return False def restartMw(): From d42a34be483b55bd98451edc9537dc83463e18d5 Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 22 Jun 2022 13:41:04 +0800 Subject: [PATCH 043/298] =?UTF-8?q?=E4=BC=98=E5=8C=96openresty=E7=BD=91?= =?UTF-8?q?=E7=AB=99=E9=85=8D=E7=BD=AE-=E9=9D=99=E6=80=81=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E4=B8=8D=E5=AD=98=E5=9C=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/openresty/index.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/plugins/openresty/index.py b/plugins/openresty/index.py index 397917aab..d686f78d3 100755 --- a/plugins/openresty/index.py +++ b/plugins/openresty/index.py @@ -131,11 +131,16 @@ def confReplace(): content = content.replace('{$OS_USER}', user) content = content.replace('{$OS_USER_GROUP}', user_group) + # 主配置文件 nconf = getServerDir() + '/nginx/conf/nginx.conf' - __content = mw.readFile(nconf) if __content.find('#user'): - mw.writeFile(getServerDir() + '/nginx/conf/nginx.conf', content) + mw.writeFile(nconf, content) + + # 静态配置 + static_conf = getServerDir() + '/nginx/conf/enable-php-00.conf' + if os.path.exists(static_conf): + mw.writeFile(static_conf, '') # give nginx root permission ng_exe_bin = getServerDir() + "/nginx/sbin/nginx" From 5c851db77775854684f5533b6cfb51dd9571a8f6 Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 22 Jun 2022 13:44:35 +0800 Subject: [PATCH 044/298] Update index.py --- plugins/openresty/index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/openresty/index.py b/plugins/openresty/index.py index d686f78d3..8875bb4e7 100755 --- a/plugins/openresty/index.py +++ b/plugins/openresty/index.py @@ -139,7 +139,7 @@ def confReplace(): # 静态配置 static_conf = getServerDir() + '/nginx/conf/enable-php-00.conf' - if os.path.exists(static_conf): + if not os.path.exists(static_conf): mw.writeFile(static_conf, '') # give nginx root permission From e766ffd55f907c74163a63772841182f40fabcd9 Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 22 Jun 2022 13:50:51 +0800 Subject: [PATCH 045/298] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/update_cn.sh | 2 +- scripts/update_dev.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/update_cn.sh b/scripts/update_cn.sh index 095210cbc..a5353fb1b 100755 --- a/scripts/update_cn.sh +++ b/scripts/update_cn.sh @@ -46,7 +46,7 @@ fi wget -O /tmp/master.zip https://gitee.com/midoks/mdserver-web/repository/archive/master.zip cd /tmp && unzip /tmp/master.zip -mv /tmp/mdserver-web-master /www/server/mdserver-web +cp -rf /tmp/mdserver-web-master/* /www/server/mdserver-web rm -rf /tmp/master.zip rm -rf /tmp/mdserver-web-master diff --git a/scripts/update_dev.sh b/scripts/update_dev.sh index 5852e81c6..c3942ae88 100755 --- a/scripts/update_dev.sh +++ b/scripts/update_dev.sh @@ -46,7 +46,7 @@ fi wget -O /tmp/dev.zip https://github.com/midoks/mdserver-web/archive/refs/heads/dev.zip cd /tmp && unzip /tmp/dev.zip -mv /tmp/mdserver-web-dev /www/server/mdserver-web +cp -rf /tmp/mdserver-web-dev/* /www/server/mdserver-web rm -rf /tmp/dev.zip rm -rf /tmp/mdserver-web-dev From 3f69f06cea85318acd14ff29aa34a82c02c0276e Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 22 Jun 2022 16:09:59 +0800 Subject: [PATCH 046/298] =?UTF-8?q?=E6=B7=BB=E5=8A=A0author?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 261eeb9e9..f37a89ca4 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [yyyy] [name of copyright owner] + Copyright [midoks] [midoks of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. From 798e51a1c175a7be484b2bca06ba9be310983536 Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 22 Jun 2022 16:33:05 +0800 Subject: [PATCH 047/298] =?UTF-8?q?=E9=81=BF=E5=85=8D=E9=A2=91=E7=B9=81?= =?UTF-8?q?=E6=89=A7=E8=A1=8Cacme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- class/core/site_api.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/class/core/site_api.py b/class/core/site_api.py index 9ab00f1dc..6978c96e1 100755 --- a/class/core/site_api.py +++ b/class/core/site_api.py @@ -599,7 +599,11 @@ class site_api: if not os.path.exists(acem): return mw.returnJson(False, '尝试自动安装ACME失败,请通过以下命令尝试手动安装

安装命令: curl https://get.acme.sh | sh

' + acem) - force_bool = False + # 避免频繁执行 + checkAcmeRun = mw.execShell('ps -ef|grep acme.sh |grep -v grep') + if checkAcmeRun[0] != '': + return mw.returnJson(False, '正在申请或更新SSL中...') + if force == 'true': force_bool = True @@ -973,7 +977,7 @@ class site_api: "-START(.|\n)+BINDING-" + domain + "-END" tmp = re.search(rep, conf).group() dirConf = tmp.replace('rewrite/' + site['name'] + '.conf;', 'rewrite/' + site[ - 'name'] + '_' + find['path'] + '.conf;') + 'name'] + '_' + find['path'] + '.conf;') conf = conf.replace(tmp, dirConf) mw.writeFile(file, conf) data = {} From eb740d7d1b1d3872d6acb40a453c5b8bf5175947 Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 22 Jun 2022 16:36:12 +0800 Subject: [PATCH 048/298] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- task.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/task.py b/task.py index 62ba5f4ef..ad284595b 100755 --- a/task.py +++ b/task.py @@ -452,8 +452,8 @@ def checkPHPVersion(version): try: url = 'http://127.0.0.1/phpfpm_status_' + version result = mw.httpGet(url) - # print version,result - # 检查nginx + # print(version,result) + # 检查openresty if result.find('Bad Gateway') != -1: return False if result.find('HTTP Error 404: Not Found') != -1: @@ -466,9 +466,16 @@ def checkPHPVersion(version): isStatus = mw.readFile(isTask) if isStatus == 'True': return True - filename = '/etc/init.d/openresty' - if os.path.exists(filename): - os.system(filename + ' start') + + # systemd + systemd = '/lib/systemd/system/openresty.service' + if os.path.exists(systemd): + execShell('systemctl reload openresty') + return True + # initd + initd = '/etc/init.d/openresty' + if os.path.exists(initd): + os.system(initd + ' reload') return True except: return True From 701bdbbe84e54e89ae4c03e6d01969fda41cb54a Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 22 Jun 2022 16:37:10 +0800 Subject: [PATCH 049/298] Update task.py --- task.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/task.py b/task.py index ad284595b..4d54a4331 100755 --- a/task.py +++ b/task.py @@ -388,7 +388,8 @@ def check502Task(): def check502(): try: - phpversions = ['53', '54', '55', '56', '70', '71', '72', '73', '74'] + phpversions = ['52', '53', '54', '55', '56', '70', + '71', '72', '73', '74', '80', '81'] for version in phpversions: sdir = mw.getServerDir() php_path = sdir + '/php/' + version + '/sbin/php-fpm' From 110a59466c318aa22a1add1d926a9953391aed35 Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 22 Jun 2022 16:37:32 +0800 Subject: [PATCH 050/298] Update task.py --- task.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/task.py b/task.py index 4d54a4331..3ec03afbf 100755 --- a/task.py +++ b/task.py @@ -388,9 +388,9 @@ def check502Task(): def check502(): try: - phpversions = ['52', '53', '54', '55', '56', '70', - '71', '72', '73', '74', '80', '81'] - for version in phpversions: + verlist = ['52', '53', '54', '55', '56', '70', + '71', '72', '73', '74', '80', '81'] + for version in verlist: sdir = mw.getServerDir() php_path = sdir + '/php/' + version + '/sbin/php-fpm' if not os.path.exists(php_path): From e47545edf6f971ea967b07d056515c9339e48fbf Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 22 Jun 2022 16:37:56 +0800 Subject: [PATCH 051/298] Update task.py --- task.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/task.py b/task.py index 3ec03afbf..4130ff396 100755 --- a/task.py +++ b/task.py @@ -390,16 +390,16 @@ def check502(): try: verlist = ['52', '53', '54', '55', '56', '70', '71', '72', '73', '74', '80', '81'] - for version in verlist: + for ver in verlist: sdir = mw.getServerDir() - php_path = sdir + '/php/' + version + '/sbin/php-fpm' + php_path = sdir + '/php/' + ver + '/sbin/php-fpm' if not os.path.exists(php_path): continue - if checkPHPVersion(version): + if checkPHPVersion(ver): continue - if startPHPVersion(version): - print('检测到PHP-' + version + '处理异常,已自动修复!') - mw.writeLog('PHP守护程序', '检测到PHP-' + version + '处理异常,已自动修复!') + if startPHPVersion(ver): + print('检测到PHP-' + ver + '处理异常,已自动修复!') + mw.writeLog('PHP守护程序', '检测到PHP-' + ver + '处理异常,已自动修复!') except Exception as e: print(str(e)) From c8cadbda2eddab2bfe014c4dc6f7df0c5638cc49 Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 22 Jun 2022 16:57:58 +0800 Subject: [PATCH 052/298] =?UTF-8?q?=E4=BC=98=E5=8C=96task=EF=BC=8C?= =?UTF-8?q?=E6=AF=8F=E5=A4=A9=E9=87=8D=E5=90=AF=E4=B8=80=E6=AC=A1openresty?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- task.py | 41 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/task.py b/task.py index 4130ff396..c1dcb1590 100755 --- a/task.py +++ b/task.py @@ -75,7 +75,6 @@ def execShell(cmdstring, cwd=None, timeout=None, shell=True): import shlex import datetime import subprocess - import time if timeout: end_time = datetime.datetime.now() + datetime.timedelta(seconds=timeout) @@ -226,7 +225,6 @@ def systemTask(): try: import system_api import psutil - import time sm = system_api.system_api() filename = 'data/control.conf' @@ -368,7 +366,7 @@ def systemTask(): mw.writeFile('logs/sys_interrupt.pl', str(ex)) restartMw() - import time + time.sleep(30) systemTask() @@ -483,8 +481,35 @@ def checkPHPVersion(version): # --------------------------------------PHP监控 end--------------------------------------------- # + +# --------------------------------------OpenResty Auto Restart Start --------------------------------------------- # +# 解决acme.sh续签后,未起效。 +def openrestyAutoRestart(): + try: + while True: + # 检查是否安装 + odir = mw.getServerDir() + '/openresty' + if os.path.exists(odir): + continue + + # systemd + systemd = '/lib/systemd/system/openresty.service' + initd = '/etc/init.d/openresty' + if os.path.exists(systemd): + execShell('systemctl reload openresty') + elif os.path.exists(initd): + os.system(initd + ' reload') + time.sleep(86400) + except Exception as e: + print(str(e)) + time.sleep(86400) + +# --------------------------------------OpenResty Auto Restart End --------------------------------------------- # + + if __name__ == "__main__": + # 系统监控 t = threading.Thread(target=systemTask) if sys.version_info.major == 3 and sys.version_info.minor >= 10: t.daemon = True @@ -492,12 +517,20 @@ if __name__ == "__main__": t.setDaemon(True) t.start() + # PHP 502错误检查线程 p = threading.Thread(target=check502Task) if sys.version_info.major == 3 and sys.version_info.minor >= 10: p.daemon = True else: p.setDaemon(True) - p.start() + # OpenResty Auto Restart Start + oar = threading.Thread(target=openrestyAutoRestart) + if sys.version_info.major == 3 and sys.version_info.minor >= 10: + oar.daemon = True + else: + oar.setDaemon(True) + oar.start() + startTask() From 9acf8edd8b35535a8d78a297794fed8a59625796 Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 22 Jun 2022 17:20:09 +0800 Subject: [PATCH 053/298] Update task.py --- task.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/task.py b/task.py index c1dcb1590..5cee97a14 100755 --- a/task.py +++ b/task.py @@ -489,7 +489,8 @@ def openrestyAutoRestart(): while True: # 检查是否安装 odir = mw.getServerDir() + '/openresty' - if os.path.exists(odir): + if not os.path.exists(odir): + time.sleep(86400) continue # systemd @@ -499,7 +500,7 @@ def openrestyAutoRestart(): execShell('systemctl reload openresty') elif os.path.exists(initd): os.system(initd + ' reload') - time.sleep(86400) + time.sleep(86400) except Exception as e: print(str(e)) time.sleep(86400) From 24d08f8f83fb63ec47c8b6a18ad0de447b0ca754 Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 22 Jun 2022 18:19:31 +0800 Subject: [PATCH 054/298] Update lib.sh --- scripts/lib.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/lib.sh b/scripts/lib.sh index 7f33fc0e7..4574326a9 100755 --- a/scripts/lib.sh +++ b/scripts/lib.sh @@ -303,8 +303,9 @@ elif [ "$OSNAME" == "ubuntu" ] || [ "$OSNAME" == "debian" ]; then apt install -y libxml2 libxml2-dev libbz2-dev libmcrypt-dev libpspell-dev librecode-dev apt install -y libgmp-dev libgmp3-dev libreadline-dev libxpm-dev apt install -y zlib1g-dev dia pkg-config - apt install -y libjpeg62-turbo-dev libjpeg-dev libpng-dev + apt install -y libjpeg-dev libpng-dev apt install -y libfreetype6 + apt install -y libjpeg62-turbo-dev apt install -y libfreetype6-dev apt install -y libevent-dev libncurses5-dev libldap2-dev From d96c3105a4683fc2cfdd18e4127e4d4287698d2a Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 22 Jun 2022 18:30:19 +0800 Subject: [PATCH 055/298] =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E4=BF=AE=E6=94=B9ser?= =?UTF-8?q?vice=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/varnish/index.html | 1 + plugins/varnish/index.py | 6 ++++ plugins/varnish/js/varnish.js | 61 +++++++++++++++++++++++++++++++++-- 3 files changed, 66 insertions(+), 2 deletions(-) diff --git a/plugins/varnish/index.html b/plugins/varnish/index.html index df23818be..d250b0686 100755 --- a/plugins/varnish/index.html +++ b/plugins/varnish/index.html @@ -4,6 +4,7 @@

服务

自启动

VCL

+

服务配置

日志

状态

diff --git a/plugins/varnish/index.py b/plugins/varnish/index.py index 21cfa828a..78f3df281 100755 --- a/plugins/varnish/index.py +++ b/plugins/varnish/index.py @@ -172,6 +172,10 @@ def initdUinstall(): def runLog(): return "/var/log/varnish/varnishncsa.log" + +def confService(): + return '/lib/systemd/system/varnish.service' + if __name__ == "__main__": func = sys.argv[1] if func == 'status': @@ -194,6 +198,8 @@ if __name__ == "__main__": print(runInfo()) elif func == 'conf': print(getConf()) + elif func == 'conf_service': + print(confService()) elif func == 'run_log': print(runLog()) elif func == 'config_tpl': diff --git a/plugins/varnish/js/varnish.js b/plugins/varnish/js/varnish.js index 607289aca..5a0ffbcec 100644 --- a/plugins/varnish/js/varnish.js +++ b/plugins/varnish/js/varnish.js @@ -9,7 +9,7 @@ function pRead(){ } -//redis负载状态 start +//varnish负载状态 start function varnishStatus() { var loadT = layer.msg('正在获取...', { icon: 16, time: 0, shade: 0.3 }); $.post('/plugins/run', {name:'varnish', func:'run_info'}, function(data) { @@ -41,4 +41,61 @@ function varnishStatus() { $(".soft-man-con").html(Con); },'json'); } -//redis负载状态 end \ No newline at end of file +//varnish负载状态 end + + +//varnish service --- +function varnishPluginConfig(_name, version, func){ + if ( typeof(version) == 'undefined' ){ + version = ''; + } + + var func_name = 'conf'; + if ( typeof(func) != 'undefined' ){ + func_name = func; + } + + var con = '

提示:Ctrl+F 搜索关键字,Ctrl+G 查找下一个,Ctrl+S 保存,Ctrl+Shift+R 查找替换!

\ + \ + \ +
    \ +
  • 此处为'+ _name + version +'主配置文件,若您不了解配置规则,请勿随意修改。
  • \ +
'; + $(".soft-man-con").html(con); + + var loadT = layer.msg('配置文件路径获取中...',{icon:16,time:0,shade: [0.3, '#000']}); + $.post('/plugins/run', {name:_name, func:func_name,version:version},function (data) { + layer.close(loadT); + + var loadT2 = layer.msg('文件内容获取中...',{icon:16,time:0,shade: [0.3, '#000']}); + var fileName = data.data; + $.post('/files/get_body', 'path=' + fileName, function(rdata) { + layer.close(loadT2); + if (!rdata.status){ + layer.msg(rdata.msg,{icon:0,time:2000,shade: [0.3, '#000']}); + return; + } + $("#textBody").empty().text(rdata.data.data); + $(".CodeMirror").remove(); + var editor = CodeMirror.fromTextArea(document.getElementById("textBody"), { + extraKeys: { + "Ctrl-Space": "autocomplete", + "Ctrl-F": "findPersistent", + "Ctrl-H": "replaceAll", + "Ctrl-S": function() { + $("#textBody").text(editor.getValue()); + pluginConfigSave(fileName); + } + }, + lineNumbers: true, + matchBrackets:true, + }); + editor.focus(); + $(".CodeMirror-scroll").css({"height":"300px","margin":0,"padding":0}); + $("#onlineEditFileBtn").click(function(){ + $("#textBody").text(editor.getValue()); + pluginConfigSave(fileName); + }); + },'json'); + },'json'); +} From 3a24753299ec70d04ed48e22327c86f32b6b14f3 Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 22 Jun 2022 19:13:25 +0800 Subject: [PATCH 056/298] =?UTF-8?q?PHP5.2=20=E9=AB=98=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E6=A3=80=E6=9F=A5,=E6=97=A0=E6=B3=95=E5=AE=89=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/php/versions/52/install.sh | 40 ++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/plugins/php/versions/52/install.sh b/plugins/php/versions/52/install.sh index 5bacea599..9cdb35703 100755 --- a/plugins/php/versions/52/install.sh +++ b/plugins/php/versions/52/install.sh @@ -11,6 +11,46 @@ sysName=`uname` install_tmp=${rootPath}/tmp/mw_install.pl + +_os=`uname` +echo "use system: ${_os}" + +if [ ${_os} == "Darwin" ]; then + OSNAME='macos' +elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then + OSNAME='centos' +elif grep -Eqi "Fedora" /etc/issue || grep -Eq "Fedora" /etc/*-release; then + OSNAME='fedora' +elif grep -Eqi "Rocky" /etc/issue || grep -Eq "Rocky" /etc/*-release; then + OSNAME='rocky' +elif grep -Eqi "AlmaLinux" /etc/issue || grep -Eq "AlmaLinux" /etc/*-release; then + OSNAME='alma' +elif grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then + OSNAME='debian' +elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then + OSNAME='ubuntu' +elif grep -Eqi "Raspbian" /etc/issue || grep -Eq "Raspbian" /etc/*-release; then + OSNAME='raspbian' +else + OSNAME='unknow' +fi + + +if [ "$OSNAME" == 'ubuntu' ] || [ "$OSNAME" == 'debian' ] ;then + apt install bison=2.4.1 + if [ "$?" != "0" ]; then + echo 'The system version is too high to install' + exit 1 + fi + + apt install flex=2.5.4 + if [ "$?" != "0" ]; then + echo 'The system version is too high to install' + exit 1 + fi +fi + + version=5.2.17 PHP_VER=52 Install_php() From fb358f18486373a9bd4d2bfb8862da532d9cbf20 Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 22 Jun 2022 20:01:43 +0800 Subject: [PATCH 057/298] debian11 mysqlclient remove --- scripts/install/debian.sh | 2 ++ scripts/update/debian.sh | 1 + 2 files changed, 3 insertions(+) diff --git a/scripts/install/debian.sh b/scripts/install/debian.sh index e5338111f..d7744973b 100644 --- a/scripts/install/debian.sh +++ b/scripts/install/debian.sh @@ -70,6 +70,8 @@ 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 diff --git a/scripts/update/debian.sh b/scripts/update/debian.sh index 5029b36ca..1e2d8156c 100644 --- a/scripts/update/debian.sh +++ b/scripts/update/debian.sh @@ -21,6 +21,7 @@ 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 dde66366edd692f00a568a100fb2b493250bdb4c Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 22 Jun 2022 20:02:25 +0800 Subject: [PATCH 058/298] Update requirements.txt --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 9f607da48..4b1870f88 100644 --- a/requirements.txt +++ b/requirements.txt @@ -22,6 +22,6 @@ zmq==0.0.0 pymongo pillow Jinja2>=2.11.2 -mysqlclient>=2.0.3 flask-caching>=1.10.1 mysql-connector-python +mysqlclient>=2.0.3 From 373b7ebadac5668424a2df9c70586a503d6b98e6 Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 22 Jun 2022 20:05:39 +0800 Subject: [PATCH 059/298] Update requirements.txt --- requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 4b1870f88..818b46e69 100644 --- a/requirements.txt +++ b/requirements.txt @@ -24,4 +24,3 @@ pillow Jinja2>=2.11.2 flask-caching>=1.10.1 mysql-connector-python -mysqlclient>=2.0.3 From b23a8ebef3b3efdf398646d6e7a7adbe95e87825 Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 22 Jun 2022 20:06:59 +0800 Subject: [PATCH 060/298] Update debian.sh --- scripts/install/debian.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/install/debian.sh b/scripts/install/debian.sh index d7744973b..b9ebed2ab 100644 --- a/scripts/install/debian.sh +++ b/scripts/install/debian.sh @@ -80,6 +80,7 @@ pip3 install gevent-websocket==0.10.1 pip3 install requests==2.20.0 pip3 install flask-caching==1.10.1 pip3 install flask-socketio==5.2.0 +pip3 install mysqlclient==2.0.3 pip3 install pymongo pip3 install psutil @@ -95,6 +96,7 @@ if [ ! -f /www/server/mdserver-web/bin/activate ];then pip3 install requests==2.20.0 pip3 install flask-caching==1.10.1 pip3 install flask-socketio==5.2.0 + pip3 install mysqlclient==2.0.3 pip3 install pymongo pip3 install psutil fi From 833ce4583430e1de48fee9ca16d4d0c9bd5d4d08 Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 22 Jun 2022 20:08:08 +0800 Subject: [PATCH 061/298] Update debian.sh --- scripts/install/debian.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install/debian.sh b/scripts/install/debian.sh index b9ebed2ab..031467152 100644 --- a/scripts/install/debian.sh +++ b/scripts/install/debian.sh @@ -79,10 +79,10 @@ pip3 install gevent==21.1.2 pip3 install gevent-websocket==0.10.1 pip3 install requests==2.20.0 pip3 install flask-caching==1.10.1 -pip3 install flask-socketio==5.2.0 pip3 install mysqlclient==2.0.3 pip3 install pymongo pip3 install psutil +pip3 install flask-socketio==5.2.0 if [ ! -f /www/server/mdserver-web/bin/activate ];then cd /www/server/mdserver-web && python3 -m venv . @@ -95,10 +95,10 @@ if [ ! -f /www/server/mdserver-web/bin/activate ];then pip3 install gevent-websocket==0.10.1 pip3 install requests==2.20.0 pip3 install flask-caching==1.10.1 - pip3 install flask-socketio==5.2.0 pip3 install mysqlclient==2.0.3 pip3 install pymongo - pip3 install psutil + pip3 install psutil + pip3 install flask-socketio==5.2.0 fi From 96201fb21d83d69c1d6a346dde461385fd34187f Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 22 Jun 2022 20:08:31 +0800 Subject: [PATCH 062/298] Update debian.sh --- scripts/install/debian.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/scripts/install/debian.sh b/scripts/install/debian.sh index 031467152..5a8199ec2 100644 --- a/scripts/install/debian.sh +++ b/scripts/install/debian.sh @@ -68,8 +68,6 @@ if [ ! -f /usr/local/bin/pip3 ];then 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 @@ -89,7 +87,6 @@ if [ ! -f /www/server/mdserver-web/bin/activate ];then cd /www/server/mdserver-web && source /www/server/mdserver-web/bin/activate pip install --upgrade pip pip3 install -r /www/server/mdserver-web/requirements.txt - pip install --upgrade setuptools pip3 install gunicorn==20.1.0 pip3 install gevent==21.1.2 pip3 install gevent-websocket==0.10.1 From b52cd332860124f7b4da746eaa0962b46bcec433 Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 22 Jun 2022 20:24:23 +0800 Subject: [PATCH 063/298] Update zlib.sh --- plugins/php/lib/zlib.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/php/lib/zlib.sh b/plugins/php/lib/zlib.sh index 56e159a18..ab6b4c50a 100644 --- a/plugins/php/lib/zlib.sh +++ b/plugins/php/lib/zlib.sh @@ -13,7 +13,7 @@ rootPath=$(dirname "$rootPath") SERVER_ROOT=$rootPath/lib SOURCE_ROOT=$rootPath/source/lib -if [ ! -d ${SERVER_ROOT}/libiconv ];then +if [ ! -d ${SERVER_ROOT}/zlib ];then cd $SOURCE_ROOT if [ ! -f ${SOURCE_ROOT}/zlib-1.2.11.tar.gz ];then From 655e239ecf811e642e3abd456ebb14e7ff4f8123 Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 22 Jun 2022 20:34:02 +0800 Subject: [PATCH 064/298] =?UTF-8?q?openresty=20zlib=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E8=87=AA=E7=BC=96=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/openresty/install.sh | 10 ++++++++-- plugins/openresty/lib/zlib.sh | 31 +++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 plugins/openresty/lib/zlib.sh diff --git a/plugins/openresty/install.sh b/plugins/openresty/install.sh index 53ae30979..409d2be2a 100755 --- a/plugins/openresty/install.sh +++ b/plugins/openresty/install.sh @@ -24,11 +24,14 @@ else useradd -g www -s /bin/bash www fi +# cd /www/server/mdserver-web/plugins/openresty && /bin/bash install.sh install 1.21.4.1 Install_openresty() { mkdir -p ${openrestyDir} echo '正在安装脚本文件...' > $install_tmp + cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash zlib.sh + if [ ! -f ${openrestyDir}/openresty-${VERSION}.tar.gz ];then wget -O ${openrestyDir}/openresty-${VERSION}.tar.gz https://openresty.org/download/openresty-${VERSION}.tar.gz fi @@ -41,9 +44,12 @@ Install_openresty() --with-http_v2_module \ --with-http_ssl_module \ --with-http_slice_module \ - --with-http_stub_status_module && make && make install && \ + --with-http_stub_status_module \ + --with-zlib=$serverPath/lib/zlib + + make && make install && make clean echo "${VERSION}" > $serverPath/openresty/version.pl - echo "" > $serverPath/web_conf/nginx/enable-php-00.conf + echo "" > $serverPath/openresty/nginx/conf/enable-php-00.conf echo '安装完成' > $install_tmp } diff --git a/plugins/openresty/lib/zlib.sh b/plugins/openresty/lib/zlib.sh new file mode 100644 index 000000000..ab6b4c50a --- /dev/null +++ b/plugins/openresty/lib/zlib.sh @@ -0,0 +1,31 @@ +#!/bin/bash +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin +export PATH + +curPath=`pwd` +rootPath=$(dirname "$curPath") +rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") + +# echo $rootPath + +SERVER_ROOT=$rootPath/lib +SOURCE_ROOT=$rootPath/source/lib + +if [ ! -d ${SERVER_ROOT}/zlib ];then + + cd $SOURCE_ROOT + if [ ! -f ${SOURCE_ROOT}/zlib-1.2.11.tar.gz ];then + wget -O zlib-1.2.11.tar.gz --no-check-certificate https://github.com/madler/zlib/archive/v1.2.11.tar.gz -T 20 + fi + + tar -zxvf zlib-1.2.11.tar.gz + cd zlib-1.2.11 + + ./configure --prefix=${SERVER_ROOT}/zlib && make && make install + + #cd $SOURCE_ROOT + #rm -rf zlib-1.2.11 + #rm -rf zlib-1.2.11.tar.gz +fi \ No newline at end of file From c126f87322e31d0f2772fa48348cf00f99797131 Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 22 Jun 2022 20:46:10 +0800 Subject: [PATCH 065/298] Update install.sh --- plugins/openresty/install.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/openresty/install.sh b/plugins/openresty/install.sh index 409d2be2a..e2c0fb068 100755 --- a/plugins/openresty/install.sh +++ b/plugins/openresty/install.sh @@ -46,10 +46,13 @@ Install_openresty() --with-http_slice_module \ --with-http_stub_status_module \ --with-zlib=$serverPath/lib/zlib - + make && make install && make clean echo "${VERSION}" > $serverPath/openresty/version.pl - echo "" > $serverPath/openresty/nginx/conf/enable-php-00.conf + + if [ -d $serverPath/openresty/nginx/conf ];then + echo "" > $serverPath/openresty/nginx/conf/enable-php-00.conf + fi echo '安装完成' > $install_tmp } From 53a7761b10978e1db757d27e0404ffeb76b71e79 Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 22 Jun 2022 22:12:52 +0800 Subject: [PATCH 066/298] #87 --- plugins/redis/index.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/redis/index.py b/plugins/redis/index.py index 0a7f24910..5c57d2fef 100755 --- a/plugins/redis/index.py +++ b/plugins/redis/index.py @@ -96,9 +96,12 @@ def initDreplace(): # config replace dst_conf = getServerDir() + '/redis.conf' - conf_content = mw.readFile(getConfTpl()) - conf_content = conf_content.replace('{$SERVER_PATH}', service_path) - mw.writeFile(dst_conf, conf_content) + dst_conf_init = getServerDir() + '/init.pl' + if not os.path.exists(dst_conf_init): + conf_content = mw.readFile(getConfTpl()) + conf_content = conf_content.replace('{$SERVER_PATH}', service_path) + mw.writeFile(dst_conf, conf_content) + mw.writeFile(dst_conf_init, 'ok') # systemd systemDir = '/lib/systemd/system' From 79d6fd3a2b66443d7ca78fa2565a8265d44aec98 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 00:48:52 +0800 Subject: [PATCH 067/298] debug zlib1g --- plugins/openresty/install.sh | 16 +++++++--------- plugins/openresty/lib/zlib.sh | 31 ------------------------------- scripts/install/debian.sh | 22 ++++++++++++++++++++++ scripts/install_dev.sh | 1 + scripts/lib.sh | 3 ++- 5 files changed, 32 insertions(+), 41 deletions(-) delete mode 100644 plugins/openresty/lib/zlib.sh diff --git a/plugins/openresty/install.sh b/plugins/openresty/install.sh index e2c0fb068..92954192e 100755 --- a/plugins/openresty/install.sh +++ b/plugins/openresty/install.sh @@ -30,8 +30,6 @@ Install_openresty() mkdir -p ${openrestyDir} echo '正在安装脚本文件...' > $install_tmp - cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash zlib.sh - if [ ! -f ${openrestyDir}/openresty-${VERSION}.tar.gz ];then wget -O ${openrestyDir}/openresty-${VERSION}.tar.gz https://openresty.org/download/openresty-${VERSION}.tar.gz fi @@ -40,19 +38,19 @@ Install_openresty() cd ${openrestyDir} && tar -zxvf openresty-${VERSION}.tar.gz # --with-openssl=$serverPath/source/lib/openssl-1.0.2q - cd ${openrestyDir}/openresty-${VERSION} && ./configure --prefix=$serverPath/openresty \ + cd ${openrestyDir}/openresty-${VERSION} && ./configure \ + --prefix=$serverPath/openresty \ --with-http_v2_module \ --with-http_ssl_module \ --with-http_slice_module \ - --with-http_stub_status_module \ - --with-zlib=$serverPath/lib/zlib + --with-http_stub_status_module - make && make install && make clean - echo "${VERSION}" > $serverPath/openresty/version.pl + gmake && gmake install && make clean - if [ -d $serverPath/openresty/nginx/conf ];then + if [ -d $serverPath/openresty ];then + echo "${VERSION}" > $serverPath/openresty/version.pl echo "" > $serverPath/openresty/nginx/conf/enable-php-00.conf - fi + fi echo '安装完成' > $install_tmp } diff --git a/plugins/openresty/lib/zlib.sh b/plugins/openresty/lib/zlib.sh deleted file mode 100644 index ab6b4c50a..000000000 --- a/plugins/openresty/lib/zlib.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash -PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin -export PATH - -curPath=`pwd` -rootPath=$(dirname "$curPath") -rootPath=$(dirname "$rootPath") -rootPath=$(dirname "$rootPath") -rootPath=$(dirname "$rootPath") - -# echo $rootPath - -SERVER_ROOT=$rootPath/lib -SOURCE_ROOT=$rootPath/source/lib - -if [ ! -d ${SERVER_ROOT}/zlib ];then - - cd $SOURCE_ROOT - if [ ! -f ${SOURCE_ROOT}/zlib-1.2.11.tar.gz ];then - wget -O zlib-1.2.11.tar.gz --no-check-certificate https://github.com/madler/zlib/archive/v1.2.11.tar.gz -T 20 - fi - - tar -zxvf zlib-1.2.11.tar.gz - cd zlib-1.2.11 - - ./configure --prefix=${SERVER_ROOT}/zlib && make && make install - - #cd $SOURCE_ROOT - #rm -rf zlib-1.2.11 - #rm -rf zlib-1.2.11.tar.gz -fi \ No newline at end of file diff --git a/scripts/install/debian.sh b/scripts/install/debian.sh index 5a8199ec2..d792c083e 100644 --- a/scripts/install/debian.sh +++ b/scripts/install/debian.sh @@ -3,6 +3,14 @@ PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH LANG=en_US.UTF-8 +# RED='\e[1;31m' # 红色 +# GREEN='\e[1;32m' # 绿色 +# YELLOW='\e[1;33m' # 黄色 +# BLUE='\e[1;34m' # 蓝色 +# PURPLE='\e[1;35m' # 紫色 +# CYAN='\e[1;36m' # 蓝绿色 +# WHITE='\e[1;37m' # 白色 +# NC='\e[0m' # 没有颜色 apt update -y @@ -63,6 +71,20 @@ systemctl stop firewalld cd /www/server/mdserver-web/scripts && bash lib.sh chmod 755 /www/server/mdserver-web/data + +#fix zlib1g-dev fail +echo -e "\e[0;32mfix zlib1g-dev install question\e[0m" +Install_TmpFile=/tmp/debian-fix-zlib1g-dev.txt +apt install -y zlib1g-dev > ${Install_TmpFile} +if [ "$?" != "0" ];then + ZLIB1G_BASE_VER=$(cat ${Install_TmpFile} | grep zlib1g | awk -F "=" '{print $2}' | awk -F ")" '{print $1}') + echo "1${ZLIB1G_BASE_VER}1" +# apt install zlib1g=1:1.2.11.dfsg-2 zlib1g-dev +fi +echo "\e[0;32mfix zlib1g-dev install question\e[0m" + + + if [ ! -f /usr/local/bin/pip3 ];then python3 -m pip install --upgrade pip setuptools wheel -i https://mirrors.aliyun.com/pypi/simple fi diff --git a/scripts/install_dev.sh b/scripts/install_dev.sh index 4b914988f..37462fa8b 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 install -y devscripts apt install -y wget zip unzip elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then OSNAME='ubuntu' diff --git a/scripts/lib.sh b/scripts/lib.sh index 4574326a9..38bcda714 100755 --- a/scripts/lib.sh +++ b/scripts/lib.sh @@ -302,7 +302,8 @@ elif [ "$OSNAME" == "ubuntu" ] || [ "$OSNAME" == "debian" ]; then apt install -y libxml2 libxml2-dev libbz2-dev libmcrypt-dev libpspell-dev librecode-dev apt install -y libgmp-dev libgmp3-dev libreadline-dev libxpm-dev - apt install -y zlib1g-dev dia pkg-config + apt install -y dia pkg-config + apt install -y zlib1g-dev apt install -y libjpeg-dev libpng-dev apt install -y libfreetype6 apt install -y libjpeg62-turbo-dev From bfa1fd2d88f0f8d9dc5e2eab6be3f60f5be4398a Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 00:50:32 +0800 Subject: [PATCH 068/298] 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 d792c083e..5b03b264c 100644 --- a/scripts/install/debian.sh +++ b/scripts/install/debian.sh @@ -81,7 +81,7 @@ if [ "$?" != "0" ];then echo "1${ZLIB1G_BASE_VER}1" # apt install zlib1g=1:1.2.11.dfsg-2 zlib1g-dev fi -echo "\e[0;32mfix zlib1g-dev install question\e[0m" +echo -e "\e[0;32mfix zlib1g-dev install question\e[0m" From d9d7939fe98ff3f951e46864021b3cacefb5bc98 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 00:54:01 +0800 Subject: [PATCH 069/298] Update debian.sh --- scripts/install/debian.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install/debian.sh b/scripts/install/debian.sh index 5b03b264c..41d8e9b5a 100644 --- a/scripts/install/debian.sh +++ b/scripts/install/debian.sh @@ -78,6 +78,7 @@ Install_TmpFile=/tmp/debian-fix-zlib1g-dev.txt apt install -y zlib1g-dev > ${Install_TmpFile} if [ "$?" != "0" ];then ZLIB1G_BASE_VER=$(cat ${Install_TmpFile} | grep zlib1g | awk -F "=" '{print $2}' | awk -F ")" '{print $1}') + ZLIB1G_BASE_VER=`echo ${ZLIB1G_BASE_VER} | sed "s/^[ \s]\{1,\}//g;s/[ \s]\{1,\}$//g"` echo "1${ZLIB1G_BASE_VER}1" # apt install zlib1g=1:1.2.11.dfsg-2 zlib1g-dev fi From a1a154cc5223231faa712efa75678b3388c53ed6 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 00:57:10 +0800 Subject: [PATCH 070/298] Update debian.sh --- scripts/install/debian.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/scripts/install/debian.sh b/scripts/install/debian.sh index 41d8e9b5a..563d47e4a 100644 --- a/scripts/install/debian.sh +++ b/scripts/install/debian.sh @@ -68,10 +68,6 @@ fi systemctl stop firewalld -cd /www/server/mdserver-web/scripts && bash lib.sh -chmod 755 /www/server/mdserver-web/data - - #fix zlib1g-dev fail echo -e "\e[0;32mfix zlib1g-dev install question\e[0m" Install_TmpFile=/tmp/debian-fix-zlib1g-dev.txt @@ -79,12 +75,17 @@ apt install -y zlib1g-dev > ${Install_TmpFile} if [ "$?" != "0" ];then ZLIB1G_BASE_VER=$(cat ${Install_TmpFile} | grep zlib1g | awk -F "=" '{print $2}' | awk -F ")" '{print $1}') ZLIB1G_BASE_VER=`echo ${ZLIB1G_BASE_VER} | sed "s/^[ \s]\{1,\}//g;s/[ \s]\{1,\}$//g"` - echo "1${ZLIB1G_BASE_VER}1" -# apt install zlib1g=1:1.2.11.dfsg-2 zlib1g-dev + # echo "1${ZLIB1G_BASE_VER}1" + apt install zlib1g=${ZLIB1G_BASE_VER} zlib1g-dev fi +rm -rf ${Install_TmpFile} echo -e "\e[0;32mfix zlib1g-dev install question\e[0m" +cd /www/server/mdserver-web/scripts && bash lib.sh +chmod 755 /www/server/mdserver-web/data + + if [ ! -f /usr/local/bin/pip3 ];then python3 -m pip install --upgrade pip setuptools wheel -i https://mirrors.aliyun.com/pypi/simple From c7daaf939709422d351a8b5c143dc370d6f3d5b7 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 01:00:46 +0800 Subject: [PATCH 071/298] 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 563d47e4a..f3b14d382 100644 --- a/scripts/install/debian.sh +++ b/scripts/install/debian.sh @@ -76,7 +76,7 @@ if [ "$?" != "0" ];then ZLIB1G_BASE_VER=$(cat ${Install_TmpFile} | grep zlib1g | awk -F "=" '{print $2}' | awk -F ")" '{print $1}') ZLIB1G_BASE_VER=`echo ${ZLIB1G_BASE_VER} | sed "s/^[ \s]\{1,\}//g;s/[ \s]\{1,\}$//g"` # echo "1${ZLIB1G_BASE_VER}1" - apt install zlib1g=${ZLIB1G_BASE_VER} zlib1g-dev + apt install -y zlib1g=${ZLIB1G_BASE_VER} zlib1g-dev fi rm -rf ${Install_TmpFile} echo -e "\e[0;32mfix zlib1g-dev install question\e[0m" From c8d092636268e79043b38e255d5fce727b0880e1 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 01:02:31 +0800 Subject: [PATCH 072/298] Update debian.sh --- scripts/install/debian.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install/debian.sh b/scripts/install/debian.sh index f3b14d382..8f354878e 100644 --- a/scripts/install/debian.sh +++ b/scripts/install/debian.sh @@ -69,7 +69,7 @@ systemctl stop firewalld #fix zlib1g-dev fail -echo -e "\e[0;32mfix zlib1g-dev install question\e[0m" +echo -e "\e[0;32mfix zlib1g-dev install question start\e[0m" Install_TmpFile=/tmp/debian-fix-zlib1g-dev.txt apt install -y zlib1g-dev > ${Install_TmpFile} if [ "$?" != "0" ];then @@ -79,7 +79,7 @@ if [ "$?" != "0" ];then apt install -y zlib1g=${ZLIB1G_BASE_VER} zlib1g-dev fi rm -rf ${Install_TmpFile} -echo -e "\e[0;32mfix zlib1g-dev install question\e[0m" +echo -e "\e[0;32mfix zlib1g-dev install question end\e[0m" cd /www/server/mdserver-web/scripts && bash lib.sh From b56d15c2f9cb3e6b6fa75b4e4d98ae1f5447107c Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 01:03:39 +0800 Subject: [PATCH 073/298] Update debian.sh --- scripts/install/debian.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install/debian.sh b/scripts/install/debian.sh index 8f354878e..0a5768639 100644 --- a/scripts/install/debian.sh +++ b/scripts/install/debian.sh @@ -76,6 +76,7 @@ if [ "$?" != "0" ];then ZLIB1G_BASE_VER=$(cat ${Install_TmpFile} | grep zlib1g | awk -F "=" '{print $2}' | awk -F ")" '{print $1}') ZLIB1G_BASE_VER=`echo ${ZLIB1G_BASE_VER} | sed "s/^[ \s]\{1,\}//g;s/[ \s]\{1,\}$//g"` # echo "1${ZLIB1G_BASE_VER}1" + echo -e "\e[1;31mapt install -y zlib1g=${ZLIB1G_BASE_VER} zlib1g-dev\e[0m" apt install -y zlib1g=${ZLIB1G_BASE_VER} zlib1g-dev fi rm -rf ${Install_TmpFile} From a7801cb5bdc93b8041e15030444a3091b202af50 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 01:08:31 +0800 Subject: [PATCH 074/298] Update debian.sh --- scripts/install/debian.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install/debian.sh b/scripts/install/debian.sh index 0a5768639..a2a4eae1d 100644 --- a/scripts/install/debian.sh +++ b/scripts/install/debian.sh @@ -76,8 +76,8 @@ if [ "$?" != "0" ];then ZLIB1G_BASE_VER=$(cat ${Install_TmpFile} | grep zlib1g | awk -F "=" '{print $2}' | awk -F ")" '{print $1}') ZLIB1G_BASE_VER=`echo ${ZLIB1G_BASE_VER} | sed "s/^[ \s]\{1,\}//g;s/[ \s]\{1,\}$//g"` # echo "1${ZLIB1G_BASE_VER}1" - echo -e "\e[1;31mapt install -y zlib1g=${ZLIB1G_BASE_VER} zlib1g-dev\e[0m" - apt install -y zlib1g=${ZLIB1G_BASE_VER} zlib1g-dev + echo -e "\e[1;31mapt install zlib1g=${ZLIB1G_BASE_VER} zlib1g-dev\e[0m" + apt install zlib1g=${ZLIB1G_BASE_VER} zlib1g-dev fi rm -rf ${Install_TmpFile} echo -e "\e[0;32mfix zlib1g-dev install question end\e[0m" From e0c18b74083260c0e0760b48e2f41b3fd61ec80f Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 01:16:25 +0800 Subject: [PATCH 075/298] 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 a2a4eae1d..672a2af12 100644 --- a/scripts/install/debian.sh +++ b/scripts/install/debian.sh @@ -77,7 +77,7 @@ if [ "$?" != "0" ];then ZLIB1G_BASE_VER=`echo ${ZLIB1G_BASE_VER} | sed "s/^[ \s]\{1,\}//g;s/[ \s]\{1,\}$//g"` # echo "1${ZLIB1G_BASE_VER}1" echo -e "\e[1;31mapt install zlib1g=${ZLIB1G_BASE_VER} zlib1g-dev\e[0m" - apt install zlib1g=${ZLIB1G_BASE_VER} zlib1g-dev + echo "Y" | apt install zlib1g=${ZLIB1G_BASE_VER} zlib1g-dev fi rm -rf ${Install_TmpFile} echo -e "\e[0;32mfix zlib1g-dev install question end\e[0m" From 43fafcdc00e91d4890b048a375141b2c6a9d1d1a Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 01:26:33 +0800 Subject: [PATCH 076/298] up --- scripts/install/debian.sh | 1 + scripts/install/ubuntu.sh | 2 ++ 2 files changed, 3 insertions(+) diff --git a/scripts/install/debian.sh b/scripts/install/debian.sh index 672a2af12..95ffafc1f 100644 --- a/scripts/install/debian.sh +++ b/scripts/install/debian.sh @@ -17,6 +17,7 @@ apt update -y apt install -y wget curl lsof unzip apt install -y python3-pip +apt install -y python3-dev apt install -y python3-venv apt install -y cron diff --git a/scripts/install/ubuntu.sh b/scripts/install/ubuntu.sh index 9bec0dbdd..adf835437 100644 --- a/scripts/install/ubuntu.sh +++ b/scripts/install/ubuntu.sh @@ -9,6 +9,8 @@ apt update -y apt install -y wget curl lsof unzip apt install -y python3-pip apt install -y python3-venv +apt install -y python3-dev + apt install -y cron From 56d042431b346ff9ef3334714f80dc923a47f01e Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 02:49:49 +0800 Subject: [PATCH 077/298] =?UTF-8?q?=E5=85=BC=E5=AE=B9debian=E6=97=A0127.0.?= =?UTF-8?q?0.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/openresty/index.py | 18 +++++++++++++++++- plugins/php/index.py | 14 ++++++++++++-- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/plugins/openresty/index.py b/plugins/openresty/index.py index 8875bb4e7..3fd4fc2af 100755 --- a/plugins/openresty/index.py +++ b/plugins/openresty/index.py @@ -265,9 +265,12 @@ def initdUinstall(): def runInfo(): + # 取Openresty负载状态 + try: - result = mw.httpGet('http://127.0.0.1/nginx_status') + url = 'http://' + mw.GetLocalIp() + '/nginx_status' + result = mw.httpGet(url) tmp = result.split() data = {} data['active'] = tmp[2] @@ -279,6 +282,19 @@ def runInfo(): data['Waiting'] = tmp[15] return mw.getJson(data) except Exception as e: + url = 'http://127.0.0.1/nginx_status' + result = mw.httpGet(url) + tmp = result.split() + data = {} + data['active'] = tmp[2] + data['accepts'] = tmp[9] + data['handled'] = tmp[7] + data['requests'] = tmp[8] + data['Reading'] = tmp[11] + data['Writing'] = tmp[13] + data['Waiting'] = tmp[15] + return mw.getJson(data) + else return 'oprenresty not started' diff --git a/plugins/php/index.py b/plugins/php/index.py index d23cfdff6..9bc5f19b2 100755 --- a/plugins/php/index.py +++ b/plugins/php/index.py @@ -534,8 +534,18 @@ def checkFpmStatusFile(version): def getFpmStatus(version): checkFpmStatusFile(version) - result = mw.httpGet( - 'http://127.0.0.1/phpfpm_status_' + version + '?json') + + try: + url = 'http://' + mw.getLocalIp() + '/phpfpm_status_' + version + '?json' + result = mw.httpGet(url) + except Exception as e: + url = 'http://127.0.0.1/phpfpm_status_' + version + '?json' + result = mw.httpGet(url) + else: + tmp = {} + tmp['start time'] = time.strftime('%Y-%m-%d %H:%M:%S', fTime) + return mw.getJson(tmp) + tmp = json.loads(result) fTime = time.localtime(int(tmp['start time'])) tmp['start time'] = time.strftime('%Y-%m-%d %H:%M:%S', fTime) From 4a6ec1a9b4dc6651ebfbea4013cabcd0e9d929a4 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 02:55:35 +0800 Subject: [PATCH 078/298] Update index.py --- plugins/openresty/index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/openresty/index.py b/plugins/openresty/index.py index 3fd4fc2af..f48dc73f0 100755 --- a/plugins/openresty/index.py +++ b/plugins/openresty/index.py @@ -294,7 +294,7 @@ def runInfo(): data['Writing'] = tmp[13] data['Waiting'] = tmp[15] return mw.getJson(data) - else + else: return 'oprenresty not started' From a638354d2cb9bc1e45d09a47ad2836eb34a4e410 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 02:56:31 +0800 Subject: [PATCH 079/298] Update index.py --- plugins/php/index.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/plugins/php/index.py b/plugins/php/index.py index 9bc5f19b2..8d496fb36 100755 --- a/plugins/php/index.py +++ b/plugins/php/index.py @@ -542,9 +542,7 @@ def getFpmStatus(version): url = 'http://127.0.0.1/phpfpm_status_' + version + '?json' result = mw.httpGet(url) else: - tmp = {} - tmp['start time'] = time.strftime('%Y-%m-%d %H:%M:%S', fTime) - return mw.getJson(tmp) + return mw.getJson({}) tmp = json.loads(result) fTime = time.localtime(int(tmp['start time'])) From cd0a2df91a34998de5621877e245dd63b189b388 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 03:01:30 +0800 Subject: [PATCH 080/298] up --- plugins/openresty/index.py | 2 +- plugins/php/index.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/openresty/index.py b/plugins/openresty/index.py index f48dc73f0..18a398605 100755 --- a/plugins/openresty/index.py +++ b/plugins/openresty/index.py @@ -269,7 +269,7 @@ def runInfo(): # 取Openresty负载状态 try: - url = 'http://' + mw.GetLocalIp() + '/nginx_status' + url = 'http://' + mw.getHostAddr() + '/nginx_status' result = mw.httpGet(url) tmp = result.split() data = {} diff --git a/plugins/php/index.py b/plugins/php/index.py index 8d496fb36..a7b9acf38 100755 --- a/plugins/php/index.py +++ b/plugins/php/index.py @@ -536,7 +536,7 @@ def getFpmStatus(version): checkFpmStatusFile(version) try: - url = 'http://' + mw.getLocalIp() + '/phpfpm_status_' + version + '?json' + url = 'http://' + mw.getHostAddr() + '/phpfpm_status_' + version + '?json' result = mw.httpGet(url) except Exception as e: url = 'http://127.0.0.1/phpfpm_status_' + version + '?json' From 3301c68b273d52c81a03c03f2dfeaaed272b5042 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 03:08:09 +0800 Subject: [PATCH 081/298] Update index.py --- plugins/php/index.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/plugins/php/index.py b/plugins/php/index.py index a7b9acf38..219b53104 100755 --- a/plugins/php/index.py +++ b/plugins/php/index.py @@ -538,15 +538,18 @@ def getFpmStatus(version): try: url = 'http://' + mw.getHostAddr() + '/phpfpm_status_' + version + '?json' result = mw.httpGet(url) + tmp = json.loads(result) + fTime = time.localtime(int(tmp['start time'])) + tmp['start time'] = time.strftime('%Y-%m-%d %H:%M:%S', fTime) except Exception as e: url = 'http://127.0.0.1/phpfpm_status_' + version + '?json' result = mw.httpGet(url) + tmp = json.loads(result) + fTime = time.localtime(int(tmp['start time'])) + tmp['start time'] = time.strftime('%Y-%m-%d %H:%M:%S', fTime) else: - return mw.getJson({}) + tmp = {} - tmp = json.loads(result) - fTime = time.localtime(int(tmp['start time'])) - tmp['start time'] = time.strftime('%Y-%m-%d %H:%M:%S', fTime) return mw.getJson(tmp) From 2f2ab82a7d5fd74bc5ca6f2295f48acaaa387f34 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 03:14:35 +0800 Subject: [PATCH 082/298] Update index.py --- plugins/php/index.py | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/plugins/php/index.py b/plugins/php/index.py index 219b53104..4213da845 100755 --- a/plugins/php/index.py +++ b/plugins/php/index.py @@ -521,15 +521,16 @@ def setFpmConfig(version): def checkFpmStatusFile(version): - if mw.isInstalledWeb(): - sdir = mw.getServerDir() - dfile = sdir + '/openresty/nginx/conf/php_status/phpfpm_status_' + version + '.conf' - if not os.path.exists(dfile): - tpl = getPluginDir() + '/conf/phpfpm_status.conf' - content = mw.readFile(tpl) - content = contentReplace(content, version) - mw.writeFile(dfile, content) - mw.restartWeb() + if not mw.isInstalledWeb(): + return False + + dfile = getServerDir() + '/nginx/conf/php_status/phpfpm_status_' + version + '.conf' + if not os.path.exists(dfile): + tpl = getPluginDir() + '/conf/phpfpm_status.conf' + content = mw.readFile(tpl) + content = contentReplace(content, version) + mw.writeFile(dfile, content) + mw.restartWeb() def getFpmStatus(version): @@ -538,19 +539,19 @@ def getFpmStatus(version): try: url = 'http://' + mw.getHostAddr() + '/phpfpm_status_' + version + '?json' result = mw.httpGet(url) - tmp = json.loads(result) - fTime = time.localtime(int(tmp['start time'])) - tmp['start time'] = time.strftime('%Y-%m-%d %H:%M:%S', fTime) + data = json.loads(result) + fTime = time.localtime(int(data['start time'])) + data['start time'] = time.strftime('%Y-%m-%d %H:%M:%S', fTime) except Exception as e: url = 'http://127.0.0.1/phpfpm_status_' + version + '?json' result = mw.httpGet(url) - tmp = json.loads(result) - fTime = time.localtime(int(tmp['start time'])) - tmp['start time'] = time.strftime('%Y-%m-%d %H:%M:%S', fTime) + data = json.loads(result) + fTime = time.localtime(int(data['start time'])) + data['start time'] = time.strftime('%Y-%m-%d %H:%M:%S', fTime) else: - tmp = {} + data = {} - return mw.getJson(tmp) + return mw.getJson(data) def getDisableFunc(version): From d782d79f460eab9fc185eb74da34e83c39f8d10f Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 03:15:00 +0800 Subject: [PATCH 083/298] Update index.py --- plugins/php/index.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/php/index.py b/plugins/php/index.py index 4213da845..c4b189bf9 100755 --- a/plugins/php/index.py +++ b/plugins/php/index.py @@ -531,6 +531,7 @@ def checkFpmStatusFile(version): content = contentReplace(content, version) mw.writeFile(dfile, content) mw.restartWeb() + return True def getFpmStatus(version): From bb470e2876bb0e99d928af7e8d1b0b2c1331752d Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 03:20:45 +0800 Subject: [PATCH 084/298] up --- plugins/openresty/index.py | 4 +--- plugins/php/index.py | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/plugins/openresty/index.py b/plugins/openresty/index.py index 18a398605..121190493 100755 --- a/plugins/openresty/index.py +++ b/plugins/openresty/index.py @@ -265,9 +265,7 @@ def initdUinstall(): def runInfo(): - # 取Openresty负载状态 - try: url = 'http://' + mw.getHostAddr() + '/nginx_status' result = mw.httpGet(url) @@ -294,7 +292,7 @@ def runInfo(): data['Writing'] = tmp[13] data['Waiting'] = tmp[15] return mw.getJson(data) - else: + except Exception as e: return 'oprenresty not started' diff --git a/plugins/php/index.py b/plugins/php/index.py index c4b189bf9..fe6be8eca 100755 --- a/plugins/php/index.py +++ b/plugins/php/index.py @@ -549,7 +549,7 @@ def getFpmStatus(version): data = json.loads(result) fTime = time.localtime(int(data['start time'])) data['start time'] = time.strftime('%Y-%m-%d %H:%M:%S', fTime) - else: + except Exception as e: data = {} return mw.getJson(data) From f159cd9e5eaebf2966aefbd41c1a1a6c0633867d Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 03:39:23 +0800 Subject: [PATCH 085/298] fix libunwind-dev fail --- requirements.txt | 1 + scripts/install/debian.sh | 16 ++++++++++++++-- scripts/lib.sh | 3 ++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index 818b46e69..4b1870f88 100644 --- a/requirements.txt +++ b/requirements.txt @@ -24,3 +24,4 @@ pillow Jinja2>=2.11.2 flask-caching>=1.10.1 mysql-connector-python +mysqlclient>=2.0.3 diff --git a/scripts/install/debian.sh b/scripts/install/debian.sh index 95ffafc1f..426b9c0ac 100644 --- a/scripts/install/debian.sh +++ b/scripts/install/debian.sh @@ -84,6 +84,20 @@ rm -rf ${Install_TmpFile} 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} +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"` + echo -e "\e[1;31mapt install liblzma5=${liblzma5_BASE_VER} libunwind-dev\e[0m" + echo "Y" | apt install liblzma5=${liblzma5_BASE_VER} libunwind-dev +fi +rm -rf ${Install_TmpFile} +echo -e "\e[0;32mfix libunwind-dev install question end\e[0m" + + cd /www/server/mdserver-web/scripts && bash lib.sh chmod 755 /www/server/mdserver-web/data @@ -103,7 +117,6 @@ pip3 install gevent==21.1.2 pip3 install gevent-websocket==0.10.1 pip3 install requests==2.20.0 pip3 install flask-caching==1.10.1 -pip3 install mysqlclient==2.0.3 pip3 install pymongo pip3 install psutil pip3 install flask-socketio==5.2.0 @@ -118,7 +131,6 @@ if [ ! -f /www/server/mdserver-web/bin/activate ];then pip3 install gevent-websocket==0.10.1 pip3 install requests==2.20.0 pip3 install flask-caching==1.10.1 - pip3 install mysqlclient==2.0.3 pip3 install pymongo pip3 install psutil pip3 install flask-socketio==5.2.0 diff --git a/scripts/lib.sh b/scripts/lib.sh index 38bcda714..cc8afa54d 100755 --- a/scripts/lib.sh +++ b/scripts/lib.sh @@ -295,7 +295,8 @@ elif [ "$OSNAME" == "ubuntu" ] || [ "$OSNAME" == "debian" ]; then apt install -y cmake automake make apt install -y webp scons - apt install -y lzma lzma-dev libunwind-dev + apt install -y lzma lzma-dev + apt install -y libunwind-dev apt install -y libpcre3 libpcre3-dev apt install -y openssl From 6f456bfd7f942d297477b3d5d7d1f3dac33d4d8d Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 04:23:12 +0800 Subject: [PATCH 086/298] Update soft.js --- route/static/app/soft.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/route/static/app/soft.js b/route/static/app/soft.js index 34b3f3c37..020a19933 100755 --- a/route/static/app/soft.js +++ b/route/static/app/soft.js @@ -33,7 +33,7 @@ function getSList(isdisplay) { var loadT = layer.msg('正在获取列表...', { icon: 16, time: 0, shade: [0.3, '#000'] }) } if (!isdisplay || isdisplay === true) - isdisplay = getCookie('p' + getCookie('softType')); + isdisplay = getCookie('p' + getCookie('soft_type')); if (isdisplay == true || isdisplay == 'true') isdisplay = 1; var search = $("#SearchValue").val(); @@ -41,7 +41,7 @@ function getSList(isdisplay) { search = '&search=' + search; } var type = ''; - var istype = getCookie('softType'); + var istype = getCookie('soft_type'); if (istype == 'undefined' || istype == 'null' || !istype) { istype = '0'; } @@ -50,7 +50,7 @@ function getSList(isdisplay) { var page = ''; if (isdisplay) { page = '&p=' + isdisplay; - setCookie('p' + getCookie('softType'), isdisplay); + setCookie('p' + getCookie('soft_type'), isdisplay); } var condition = (search + type + page).slice(1); @@ -162,7 +162,7 @@ function getSList(isdisplay) { sBody += pBody; $("#softList").html(sBody); $(".menu-sub span").click(function() { - setCookie('softType', $(this).attr('typeid')); + setCookie('soft_type', $(this).attr('typeid')); $(this).addClass("on").siblings().removeClass("on"); getSList(); }); From 08b402d5168ec24aa98cc9820c45d175f2479838 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 04:40:48 +0800 Subject: [PATCH 087/298] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- class/core/mw.py | 17 +++++++++++++++++ class/core/plugins_api.py | 7 +++++++ 2 files changed, 24 insertions(+) diff --git a/class/core/mw.py b/class/core/mw.py index 5629d57ac..f8fa5ccf7 100755 --- a/class/core/mw.py +++ b/class/core/mw.py @@ -98,6 +98,23 @@ def isAppleSystem(): return False +def isNumber(s): + try: + float(s) + return True + except ValueError: + pass + + try: + import unicodedata + unicodedata.numeric(s) + return True + except (TypeError, ValueError): + pass + + return False + + def deleteFile(file): if os.path.exists(file): os.remove(file) diff --git a/class/core/plugins_api.py b/class/core/plugins_api.py index 3a22894f6..26f70906e 100755 --- a/class/core/plugins_api.py +++ b/class/core/plugins_api.py @@ -48,6 +48,13 @@ class plugins_api: def listApi(self): sType = request.args.get('type', '0') sPage = request.args.get('p', '1') + + if not mw.isNumber(sPage): + sPage = 1 + + if not mw.isNumber(sType): + sType = 0 + # print sPage data = self.getPluginList(sType, int(sPage)) return mw.getJson(data) From 087531a4147e43a8e29d18331e42f340cfe50ecc Mon Sep 17 00:00:00 2001 From: xcsoft Date: Thu, 23 Jun 2022 09:43:38 +0800 Subject: [PATCH 088/298] remove unused import --- tools.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tools.py b/tools.py index 5f65f621e..9eef50e1a 100755 --- a/tools.py +++ b/tools.py @@ -13,7 +13,6 @@ cmd = 'ls /usr/local/lib/ | grep python | cut -d \\ -f 1 | awk \'END {print}\' info = mw.execShell(cmd) p = "/usr/local/lib/" + info[0].strip() + "/site-packages" sys.path.append(p) -import psutil def set_mysql_root(password): From e24c8ac03ee65ae5482a4c8418b5f734ec96061f Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 10:46:59 +0800 Subject: [PATCH 089/298] 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 090/298] 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 091/298] 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 8e0d809c5e8b09870e28654d7fa9b1569a5c59d1 Mon Sep 17 00:00:00 2001 From: xcsoft Date: Thu, 23 Jun 2022 11:40:06 +0800 Subject: [PATCH 092/298] fix: v4 & v6 --- scripts/init.d/mw.tpl | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/scripts/init.d/mw.tpl b/scripts/init.d/mw.tpl index c59f86a7f..4eacd0304 100755 --- a/scripts/init.d/mw.tpl +++ b/scripts/init.d/mw.tpl @@ -185,14 +185,38 @@ case "$1" in if [ -f $mw_path/data/admin_path.pl ];then auth_path=$(cat $mw_path/data/admin_path.pl) fi - if [ "$address" = "" ];then - address=$(curl -sS --connect-timeout 10 -m 60 https://v6r.ipip.net/?format=text) + + if [ "$address" = "" ];then + v4_available=true + v6_available=true + { + v4=$(curl -4 -sS --connect-timeout 5 -m 60 https://v6r.ipip.net/?format=text) + } || { + v4_available=false + } + { + v6=$(curl -6 -sS --connect-timeout 5 -m 60 https://v6r.ipip.net/?format=text) + } || { + v6_available=false + } + + if [ $v4_available = true ] && [ $v6_available = true ]; then + address="MW-Panel-Url: http://$v4:$port$auth_path \nMW-Panel-Url: http://[$v6]:$port$auth_path" + elif [ $v4_available = true ]; then + address="MW-Panel-Url: http://$v4:$port$auth_path" + elif [ $v6_available = true ]; then + address="MW-Panel-Url: http://[$v6]:$port$auth_path" + else + address="No v4 or v6 available" + fi + else + address="MW-Panel-Url: http://$address:$port$auth_path" fi echo -e "==================================================================" echo -e "\033[32mMW-Panel default info!\033[0m" echo -e "==================================================================" - echo -e "MW-Panel-URL: http://$address:$port$auth_path" + echo -e "$address" echo -e `python3 $mw_path/tools.py username` echo -e "password: $password" echo -e "\033[33mWarning:\033[0m" From 672a9af6202d65565fbb5f29520354720732212a Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 11:57:42 +0800 Subject: [PATCH 093/298] =?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 094/298] 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 095/298] 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 096/298] 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 097/298] 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 098/298] 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 099/298] =?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 100/298] =?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 101/298] 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 102/298] 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 103/298] 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 104/298] 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 105/298] 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 106/298] 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 107/298] 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 108/298] 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 109/298] 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 9941c9a0701412e25c5c8edcc58d8efcba01e65d Mon Sep 17 00:00:00 2001 From: xcsoft Date: Thu, 23 Jun 2022 16:04:08 +0800 Subject: [PATCH 110/298] Update install_dev.sh --- scripts/install_dev.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/install_dev.sh b/scripts/install_dev.sh index 37462fa8b..883e31456 100755 --- a/scripts/install_dev.sh +++ b/scripts/install_dev.sh @@ -73,10 +73,11 @@ if [ $OSNAME != "macos" ];then fi echo "use system version: ${OSNAME}" - curl -fsSL https://raw.githubusercontent.com/midoks/mdserver-web/dev/scripts/install/${OSNAME}.sh | bash +chmod +x /www/server/mdserver-web/mw-cli +ln -s /www/server/mdserver-web/mw-cli /usr/bin/mw-cli endTime=`date +%s` ((outTime=(${endTime}-${startTime})/60)) -echo -e "Time consumed:\033[32m $outTime \033[0mMinute!" \ No newline at end of file +echo -e "Time consumed:\033[32m $outTime \033[0mMinute!" From fa18e0174ca5a4adaeae9a912f50e80fd3eb1815 Mon Sep 17 00:00:00 2001 From: xcsoft Date: Thu, 23 Jun 2022 16:04:11 +0800 Subject: [PATCH 111/298] Update install_cn.sh --- scripts/install_cn.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/install_cn.sh b/scripts/install_cn.sh index 15e878001..3409557f1 100755 --- a/scripts/install_cn.sh +++ b/scripts/install_cn.sh @@ -74,7 +74,9 @@ fi echo "use system version: ${OSNAME}" curl -fsSL https://gitee.com/midoks/mdserver-web/raw/master/scripts/install/${OSNAME}.sh | bash +chmod +x /www/server/mdserver-web/mw-cli +ln -s /www/server/mdserver-web/mw-cli /usr/bin/mw-cli endTime=`date +%s` ((outTime=(${endTime}-${startTime})/60)) -echo -e "Time consumed:\033[32m $outTime \033[0mMinute!" \ No newline at end of file +echo -e "Time consumed:\033[32m $outTime \033[0mMinute!" From 300bcfc2efbb3052716c35d5e031f1562f53750d Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 23 Jun 2022 17:07:09 +0800 Subject: [PATCH 112/298] =?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 113/298] 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 114/298] 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 115/298] =?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 116/298] 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 117/298] =?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 118/298] =?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 119/298] =?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 120/298] =?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 121/298] 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 122/298] 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 123/298] 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 124/298] 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 125/298] 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 126/298] 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 127/298] 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 128/298] 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 129/298] 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 130/298] =?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 131/298] 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 132/298] =?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 133/298] 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+'