Skip to content

Commit

Permalink
Merge pull request #205 from midoks/dev
Browse files Browse the repository at this point in the history
0.9.12
  • Loading branch information
midoks authored Oct 8, 2022
2 parents 1282bab + 37245ca commit 9c97e1c
Show file tree
Hide file tree
Showing 60 changed files with 1,927 additions and 5,658 deletions.
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,15 @@ docker run -itd --name mw-server --privileged=true -p 7200:7200 -p 80:80 -p 443:
```


### 版本更新 0.9.11

* 大文件解压优化。
* 防火墙api优化。
* mysql|mariadb安装删除冗余账户。
* imail插件添加。
* 安装面板初始化安装时不再固定端口[7200],优化为随机端口。
* redis添加性能调整功能。
### 版本更新 0.9.12

* 日志清理插件优化。
* 计划任务显示完整。
* 加入gitea插件。
* 融合mw-cli命令。
* 加快php编译速度。
* swap加上调整功能。
* 其他细节优化。


### JSDelivr安装地址
Expand Down
2 changes: 1 addition & 1 deletion class/core/config_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

class config_api:

__version = '0.9.11'
__version = '0.9.12'

def __init__(self):
pass
Expand Down
8 changes: 4 additions & 4 deletions class/core/crontab_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,10 +414,10 @@ def getShell(self, param):
script_dir = mw.getServerDir() + "/mdserver-web/scripts"

wheres = {
'path': head + "python " + script_dir + "/backup.py path " + param['sname'] + " " + str(param['save']),
'site': head + "python " + script_dir + "/backup.py site " + param['sname'] + " " + str(param['save']),
'database': head + "python " + script_dir + "/backup.py database " + param['sname'] + " " + str(param['save']),
'logs': head + "python " + script_dir + "/logs_backup.py " + param['sname'] + log + " " + str(param['save']),
'path': head + "python3 " + script_dir + "/backup.py path " + param['sname'] + " " + str(param['save']),
'site': head + "python3 " + script_dir + "/backup.py site " + param['sname'] + " " + str(param['save']),
'database': head + "python3 " + script_dir + "/backup.py database " + param['sname'] + " " + str(param['save']),
'logs': head + "python3 " + script_dir + "/logs_backup.py " + param['sname'] + log + " " + str(param['save']),
'rememory': head + "/bin/bash " + script_dir + '/rememory.sh'
}
if param['backup_to'] != 'localhost':
Expand Down
6 changes: 3 additions & 3 deletions class/core/mw.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ def getSpeed():
return json.loads(data)


def getLastLine(inputfile, lineNum):
def getLastLineBk(inputfile, lineNum):
# 读文件指定倒数行数
try:
fp = open(inputfile, 'rb')
Expand Down Expand Up @@ -585,7 +585,7 @@ def getLastLine(inputfile, lineNum):
# return getMsg('TASK_SLEEP')


def getNumLines(path, num, p=1):
def getLastLine(path, num, p=1):
pyVersion = sys.version_info[0]
try:
import html
Expand Down Expand Up @@ -624,7 +624,7 @@ def getNumLines(path, num, p=1):
t_buf = fp.read(to_read)
if pyVersion == 3:
if type(t_buf) == bytes:
t_buf = t_buf.decode('utf-8')
t_buf = t_buf.decode("utf-8", "ignore").strip()
buf = t_buf + buf
fp.seek(-to_read, 1)
if pos - to_read == 0:
Expand Down
86 changes: 0 additions & 86 deletions mw-cli

This file was deleted.

6 changes: 5 additions & 1 deletion plugins/clean/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<div class="bt-w-menu">
<p class="bgw" onclick="pluginService('clean');">服务</p>
<p onclick="pluginConfig('clean');">配置修改</p>
<p onclick="pluginLogs('clean',null,'run_log');">运行日志</p>
<p onclick="pRead()">说明</p>
</div>
<div class="bt-w-con pd15">
Expand All @@ -16,7 +17,10 @@

function pRead(){
var readme = '<ul class="help-info-text c7">';
readme += '<li>cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/clean/index.py clean</li>';
readme += '<li>启动后,假如到计划中[2:30]执行。</li>';
readme += '<li>【*】代表要删除。</li>';
readme += '<li>添加/删除清除日志,可在`配置修改`中添加/删除。</li>';
readme += '<li>如果是目录,会寻找【.log】后缀的文件清空。</li>';
readme += '</ul>';

$('.soft-man-con').html(readme);
Expand Down
Loading

0 comments on commit 9c97e1c

Please sign in to comment.