diff --git a/.github/workflows/python-app-mysql8.yml b/.github/workflows/python-app-mysql8.yml new file mode 100644 index 000000000..eae53b1c4 --- /dev/null +++ b/.github/workflows/python-app-mysql8.yml @@ -0,0 +1,45 @@ +# This workflow will install Python dependencies, run tests and lint with a single version of Python +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + +name: MW APP MySQL80 + +on: + push: + branches: [ "master","dev" ] + pull_request: + branches: [ "master","dev" ] + +permissions: + contents: read + +jobs: + build: + strategy: + matrix: + os: [ubuntu-latest] + runs-on: ${{ matrix.os }} + #runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.10 + uses: actions/setup-python@v3 + with: + python-version: "3.10" + - name: Install MW + run: | + sudo bash scripts/install_dev.sh + - name: Install MySQL80 + run: | + sudo mkdir -p /tmp + sudo echo '' > /tmp/t.log + sudo chmod 777 /www/server/mdserver-web/plugins/mysql/versions/8.0/install.sh + sudo cat /www/server/mdserver-web/plugins/mysql/versions/8.0/install.sh > /tmp/t.log + sudo echo "export MAKEJN=-j12\n" >> /www/server/mdserver-web/plugins/mysql/versions/8.0/install.sh + sudo cat /tmp/t.log >> /www/server/mdserver-web/plugins/mysql/versions/8.0/install.sh + + cd /www/server/mdserver-web/plugins/mysql && sudo bash install.sh install 8.0 + - name: Start DEBUG + run: | + gunicorn -c setting.py app:app + python3 task.py & diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml deleted file mode 100644 index 1a5293b29..000000000 --- a/.github/workflows/python-app.yml +++ /dev/null @@ -1,36 +0,0 @@ -# This workflow will install Python dependencies, run tests and lint with a single version of Python -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions - -name: MW APP - -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - -permissions: - contents: read - -jobs: - build: - strategy: - matrix: - os: [ubuntu-latest] - runs-on: ${{ matrix.os }} - #runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - name: Set up Python 3.10 - uses: actions/setup-python@v3 - with: - python-version: "3.10" - - name: Install dependencies - run: | - python -m pip install --upgrade pip - if [ -f requirements.txt ]; then pip3 install -r requirements.txt; fi - - name: Start DEBUG - run: | - gunicorn -c setting.py app:app - python3 task.py & diff --git a/.github/workflows/python3.6.8-app.yml b/.github/workflows/python3.6.8-app.yml deleted file mode 100644 index ddc13ace1..000000000 --- a/.github/workflows/python3.6.8-app.yml +++ /dev/null @@ -1,36 +0,0 @@ -# This workflow will install Python dependencies, run tests and lint with a single version of Python -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions - -name: MW APP 3.6.8 - -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - -permissions: - contents: read - -jobs: - build: - strategy: - matrix: - os: [ubuntu-latest] - runs-on: ${{ matrix.os }} - #runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - name: Set up Python 3.6.8 - uses: actions/setup-python@v3 - with: - python-version: "3.6.8" - - name: Install dependencies - run: | - python -m pip install --upgrade pip - if [ -f requirements.txt ]; then pip3 install -r requirements.txt; fi - - name: Start DEBUG - run: | - gunicorn -c setting.py app:app - python3 task.py & diff --git a/.gitignore b/.gitignore index 4d685bdcb..7c97e80b2 100644 --- a/.gitignore +++ b/.gitignore @@ -129,6 +129,12 @@ pyvenv.cfg include data/api_login.txt data/sessions -data/ssl.pl -plugins/gdrive/ -plugins/openlitespeed/ +data/ssl.pl +data/port.pl +plugins/openlitespeed +plugins/gdrive/ +data/ipv6.pl +data/restart.pl +pip-selfcheck.json +data/ssl.pl + diff --git a/README.md b/README.md index ca2c26962..4d37a1c4b 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,8 @@ 基本上可以使用,后续会继续优化!欢迎提供意见! +- https://t.me/+ZYXZ20VaKVQxYzM1 + ### 主要插件介绍 * OpenResty - 轻量级,占有内存少,并发能力强。 @@ -38,11 +40,6 @@ * swap插件[虚拟内存]。 -### 问题 -- OP防火墙,暂不要开启。 - - - ### GW使用 - 自动安装 diff --git a/class/core/site_api.py b/class/core/site_api.py index 36a0be774..109e7a5e9 100755 --- a/class/core/site_api.py +++ b/class/core/site_api.py @@ -85,9 +85,9 @@ class site_api: name = request.form.get('name', '') import time # 清理旧的 - defaultSite = mw.readFile('data/defaultSite.pl') - if defaultSite: - path = self.getHostConf(defaultSite) + default_site = mw.readFile('data/default_site.pl') + if default_site: + path = self.getHostConf(default_site) if os.path.exists(path): conf = mw.readFile(path) rep = "listen\s+80.+;" @@ -105,7 +105,7 @@ class site_api: conf = re.sub(rep, 'listen 443 ssl default_server;', conf, 1) mw.writeFile(path, conf) - mw.writeFile('data/defaultSite.pl', name) + mw.writeFile('data/default_site.pl', name) mw.restartWeb() return mw.returnJson(True, '设置成功!') @@ -113,7 +113,7 @@ class site_api: data = {} data['sites'] = mw.M('sites').field( 'name').order('id desc').select() - data['defaultSite'] = mw.readFile('data/defaultSite.pl') + data['default_site'] = mw.readFile('data/default_site.pl') return mw.getJson(data) def setPsApi(self): @@ -1624,7 +1624,7 @@ class site_api: if not mw.isAppleSystem(): mw.execShell('chown -R www:www ' + path) - mw.writeFile(path + '/index.html', '已经开始工作!!!') + mw.writeFile(path + '/index.html', 'Work has started!!!') mw.execShell('chmod -R 755 ' + path) def nginxAddDomain(self, webname, domain, port): diff --git a/data/defaultSite.pl b/data/defaultSite.pl deleted file mode 100644 index bec7f1669..000000000 --- a/data/defaultSite.pl +++ /dev/null @@ -1 +0,0 @@ -t.vvv \ No newline at end of file diff --git a/mw-cli b/mw-cli old mode 100644 new mode 100755 diff --git a/plugins/mysql/versions/8.0/install.sh b/plugins/mysql/versions/8.0/install.sh index b1677e74e..5bb23a902 100755 --- a/plugins/mysql/versions/8.0/install.sh +++ b/plugins/mysql/versions/8.0/install.sh @@ -41,7 +41,7 @@ Install_mysql() fi if [ ! -f ${mysqlDir}/mysql-boost-8.0.25.tar.gz ];then - wget -O ${mysqlDir}/mysql-boost-8.0.25.tar.gz https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-8.0.25.tar.gz + wget -O ${mysqlDir}/mysql-boost-8.0.25.tar.gz --tries=3 https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-8.0.25.tar.gz fi #检测文件是否损坏. @@ -53,7 +53,7 @@ Install_mysql() else # 重新下载 rm -rf ${mysqlDir}/mysql-8.0.25 - wget -O ${mysqlDir}/mysql-boost-8.0.25.tar.gz https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-8.0.25.tar.gz + wget -O ${mysqlDir}/mysql-boost-8.0.25.tar.gz --tries=3 https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-8.0.25.tar.gz fi fi diff --git a/route/static/app/site.js b/route/static/app/site.js index 435e40b0d..5a6a09f49 100755 --- a/route/static/app/site.js +++ b/route/static/app/site.js @@ -922,7 +922,7 @@ function setIndex(id){ //设置默认站点 function setDefaultSite(){ - var name = $("#defaultSite").val(); + var name = $("#default_site").val(); var loadT = layer.msg('正在处理,请稍候...',{icon:16,time:0,shade: [0.3, '#000']}); $.post('/site/set_default_site','name='+name,function(rdata){ layer.closeAll(); @@ -938,7 +938,7 @@ function getDefaultSite(){ var selected = ''; for(var i=0;i' + rdata.sites[i].name + ''; } @@ -952,7 +952,7 @@ function getDefaultSite(){ content:'
\

\ 默认站点\ - \ + \

\