Compare commits

...
12 Commits
Author SHA1 Message Date
Mr Chen 887589dbf9 Merge pull request #157 from midoks/dev
0.9.2
2022-08-12 12:12:37 +08:00
midoks bc640ad888 Update index.py 2022-08-12 12:07:08 +08:00
midoks 8b00a7436a up 2022-08-12 11:39:45 +08:00
midoks e8483b78a0 Update info.json 2022-08-12 00:46:53 +08:00
midoks ab6ffa4cf5 Update README.md 2022-08-12 00:41:24 +08:00
midoks 14682df7cb Update README.md 2022-08-12 00:40:42 +08:00
midoks 2c9b05be6d Update config_api.py 2022-08-12 00:37:56 +08:00
midoks 5626110bd9 常用命令说明 2022-08-12 00:37:19 +08:00
midoks e3e704984e 优化 2022-08-12 00:12:56 +08:00
midoks 1ac89246a4 防火墙安装自动化 2022-08-11 23:49:24 +08:00
midoks 6c8790b915 Update install.sh 2022-08-11 23:37:45 +08:00
midoks 2dad3bc59d Update info.json 2022-08-11 22:46:01 +08:00
10 changed files with 103 additions and 10 deletions
+5 -4
View File
@@ -1,4 +1,4 @@
### mdserver-web 0.9.1
### mdserver-web 0.9.2
简单的Linux面板,感谢BT.CN写出如此好的web管理软件。我一看到,就知道这是我一直想要的页面化管理方式。
复制了后台管理界面,按照自己想要的方式写了一版。
@@ -22,6 +22,7 @@
- 吹水组 - https://t.me/mdserver_web
- [兼容性测试报告](/compatibility.md)
- [常用命令说明](/cmd.md)
### 主要插件介绍
@@ -70,10 +71,10 @@ docker run -itd --name mw-server --privileged=true -p 7200:7200 -p 80:80 -p 443:
```
### 版本更新 0.9.1
### 版本更新 0.9.2
* 菜单修复.
* 更新修复.
* 批量域名添加修复。
* 常用命令说明。
### JSDelivr安装地址
+1 -1
View File
@@ -16,7 +16,7 @@ from flask import request
class config_api:
# mariadb 优化
__version = '0.9.1'
__version = '0.9.2'
def __init__(self):
pass
+1 -1
View File
@@ -171,7 +171,7 @@ class Sql():
def getField(self, keyName):
# 取回指定字段
result = self.field(keyName).select()
if len(result) >= 1:
if len(result) == 1:
return result[0][keyName]
return result
+4 -1
View File
@@ -878,6 +878,9 @@ class site_api:
domain = request.form.get('domain', '')
webname = request.form.get('webname', '')
pid = request.form.get('id', '')
return self.addDomain(domain, webname, pid)
def addDomain(self, domain, webname, pid):
if len(domain) < 3:
return mw.returnJson(False, '域名不能为空!')
domains = domain.split(',')
@@ -2184,7 +2187,7 @@ location ^~ {from} {
sdomain = domain
swebname = self.siteName
spid = str(pid)
# self.addDomain(domain, webname, pid)
self.addDomain(domain, webname, pid)
mw.M('domain').add('pid,name,port,addtime',
(pid, self.siteName, self.sitePort, mw.getDate()))
+68
View File
@@ -0,0 +1,68 @@
### 常用命令说明
- 面板相关命令
```
/etc/init.d/mw default
service mw [start|stop|reload|restart|status]
```
- OpenResty
```
sytemctl [start|stop|reload|restart|status] openresty
```
- MySQL
```
sytemctl [start|stop|reload|restart|status] mysql
```
- MariaDB
```
sytemctl [start|stop|reload|restart|status] mariadb
```
- PHP
```
sytemctl [start|stop|reload|restart|status] php[54-81]
sytemctl start php71
```
- Redis
```
sytemctl [start|stop|reload|restart|status] redis
```
- Memcached
```
sytemctl [start|stop|reload|restart|status] memcached
```
- sphinx
```
sytemctl [start|stop|reload|restart|status] sphinx
```
+7 -2
View File
@@ -901,8 +901,11 @@ def getWafConf():
return mw.readFile(conf)
def getWafSite():
return ''
def installPreInspection():
check_op = mw.getServerDir() + "/openresty"
if not os.path.exists(check_op):
return "请先安装OpenResty"
return 'ok'
if __name__ == "__main__":
@@ -917,6 +920,8 @@ if __name__ == "__main__":
print(restart())
elif func == 'reload':
print(reload())
elif func == 'install_pre_inspection':
print(installPreInspection())
elif func == 'conf':
print(getConf())
elif func == 'get_rule':
+4
View File
@@ -18,9 +18,13 @@ Install_of(){
echo '0.1' > $serverPath/op_waf/version.pl
echo 'install ok' > $install_tmp
cd ${rootPath} && python3 plugins/op_waf/index.py start
}
Uninstall_of(){
cd ${rootPath} && python3 plugins/op_waf/index.py stop
rm -rf $serverPath/op_waf
}
+6
View File
@@ -296,6 +296,10 @@ def errorLogPath():
return getServerDir() + '/nginx/logs/error.log'
def installPreInspection():
return 'ok'
if __name__ == "__main__":
func = sys.argv[1]
if func == 'status':
@@ -314,6 +318,8 @@ if __name__ == "__main__":
print(initdInstall())
elif func == 'initd_uninstall':
print(initdUinstall())
elif func == 'install_pre_inspection':
print(installPreInspection())
elif func == 'conf':
print(getConf())
elif func == 'get_os':
+1
View File
@@ -5,6 +5,7 @@
"type":"其他插件",
"ps":"轻量级,占有内存少,并发能力强",
"shell":"install.sh",
"install_pre_inspection":true,
"checks":"server/openresty",
"path":"server/openresty",
"author":"agentzh",
+6 -1
View File
@@ -1,9 +1,14 @@
[
{
"version": "0.9.2",
"content": "* 批量域名添加修复。<br/> * 常用命令说明。",
"path": "https://github.com/midoks/mdserver-web/releases/download/0.9.2/mdserver-web.zip"
},
{
"version": "0.9.1",
"content": "* 菜单修复。<br/> * 更新修复",
"path": "https://github.com/midoks/mdserver-web/releases/download/0.9.1/mdserver-web.zip",
"purge":"https://purge.jsdelivr.net/gh/midoks/mdserver-web@latest/scripts/update.sh",
"purge":"https://purge.jsdelivr.net/gh/midoks/mdserver-web@latest/scripts/update.sh"
},
{
"version": "0.9.0",