Compare commits

..

1018 Commits
0.18.5 ... dev

Author SHA1 Message Date
2f2eb3fc3b Update install.sh 2026-11-05 22:37:35 +08:00
c4047b5ef1 Update install.sh 2026-11-05 22:34:34 +08:00
65d039bf48 Update install.sh 2026-11-05 22:33:16 +08:00
70092129e4 Update install.sh 2026-11-05 22:26:28 +08:00
556471908d Update install.sh 2026-11-05 22:25:39 +08:00
109405b54b Update install.sh 2026-11-05 22:24:00 +08:00
9795ae23c7 Update install.sh 2026-11-05 22:15:28 +08:00
1979a02cd5 cmd git 2026-11-05 22:14:14 +08:00
39b14b92de update 2026-11-05 22:07:06 +08:00
b8a5c4d178 Create manticore.service.tpl 2026-11-05 21:54:41 +08:00
7a20f56335 Update install.sh 2026-11-05 21:41:57 +08:00
e18bd098d9 Update info.json 2026-11-05 21:35:34 +08:00
8aaa3cfab6 Update install.sh 2026-11-05 21:31:34 +08:00
02a9f84c13 Update install.sh 2026-11-05 21:12:38 +08:00
23320865b0 update 2026-11-05 21:11:33 +08:00
6f365e122a Create install.sh 2026-11-05 20:31:10 +08:00
e3229efe1b Update install.sh 2026-11-05 20:27:25 +08:00
710acecff7 update 2026-11-05 20:21:13 +08:00
9c7a155be0 update 2026-11-05 20:18:44 +08:00
157a5da6f1 Update index.py 2026-11-05 19:19:31 +08:00
7ee5ed5808 up 2026-11-05 19:02:31 +08:00
e8a96959a5 Update install.sh 2026-11-05 18:56:26 +08:00
a4845acbb6 Update index.py 2026-11-05 18:44:11 +08:00
fec638007c Update setting.py 2026-11-05 16:49:15 +08:00
80f7a0de38 Update setting.py 2026-11-05 16:42:39 +08:00
a3bb9ac80a Update setting.py 2026-11-05 16:30:21 +08:00
3dcc6e3349 Update setting.py 2026-11-05 16:28:18 +08:00
60870a4e5d Update setting.py 2026-11-05 16:18:39 +08:00
ea635bc960 Update setting.py 2026-11-05 16:08:12 +08:00
749c8443ee Update setting.py 2026-11-05 16:06:46 +08:00
052120c25e Update setting.py 2026-11-05 16:05:48 +08:00
a2b3b86c43 Update setting.py 2026-11-05 16:05:37 +08:00
6d57e3dd40 Update mw.tpl 2026-11-05 15:45:41 +08:00
a67689d890 Update mw.tpl 2026-11-05 15:36:24 +08:00
b6bffedf06 Update mw.tpl 2026-11-05 15:34:52 +08:00
e07eaf4226 Update mw.tpl 2026-11-05 15:32:05 +08:00
dd9e9d4899 Update mw.tpl 2026-11-05 15:17:19 +08:00
cd1d80915a Update mw.tpl 2026-11-05 15:14:19 +08:00
40f64ab3e8 Update install.sh 2026-11-05 14:55:31 +08:00
69ba921ec4 Update index.py 2026-11-05 14:54:39 +08:00
255fbcd688 Update index.py 2026-11-05 14:35:35 +08:00
24e12b70c8 Update index.py 2026-11-05 14:35:02 +08:00
0feee48ea8 Update install.sh 2026-11-05 14:31:22 +08:00
5cd8c5ae2c Update index.py 2026-11-05 14:28:11 +08:00
28a75eaedc Update index.py 2026-11-05 14:26:12 +08:00
50d0794f4a Update index.py 2026-11-05 14:23:24 +08:00
755e53f4d7 Update index.py 2026-11-05 14:20:13 +08:00
1876027bd2 update 2026-11-05 14:14:23 +08:00
26b06f9bb2 Update index.py 2026-11-05 14:10:37 +08:00
8f67d35260 update 2026-11-05 13:40:46 +08:00
7fa78c78e2 更加优化匹配 2026-11-05 13:37:37 +08:00
ae7276300f Update install.sh 2026-11-05 11:57:54 +08:00
420816ff4e Update requirements.txt 2026-11-05 09:58:54 +08:00
df34a7ef9b Update plugin.py 2026-11-05 00:12:28 +08:00
e1b199c8d5 Update plugin.py 2026-11-05 00:07:29 +08:00
Mr Chen
e6060847ef Merge pull request #965 from midoks/dev
常规更新
2026-11-04 15:52:18 +08:00
7ff1530684 update 2026-11-04 15:35:08 +08:00
cd0ad7488e update 2026-11-04 15:33:18 +08:00
6a0f81154a Update index.py 2026-11-04 15:31:09 +08:00
Mr Chen
096c736c28 Merge pull request #964 from midoks/dev
常规优化
2026-11-04 14:51:09 +08:00
7d01a487dc Merge branch 'master' into dev 2026-11-04 14:47:28 +08:00
ba95ef1537 Update install.sh 2026-11-04 14:43:26 +08:00
01035018c4 Update install.sh 2026-11-04 14:43:07 +08:00
8aa12b979a Update install.sh 2026-11-04 14:40:26 +08:00
98dc9e5bd8 Update tool_cron.py 2026-11-04 14:34:10 +08:00
4ebadc28c9 Update tool_cron.py 2026-11-04 14:32:34 +08:00
02115226fa Update tool_cron.py 2026-11-04 14:31:51 +08:00
f661aea83c Update manticore.conf 2026-11-04 14:17:36 +08:00
cfd3abf97b Update manticore.conf 2026-11-04 14:15:16 +08:00
b5d1c8cfcf Update manticore.conf 2026-11-04 14:12:11 +08:00
98156cc1cb Update sql_mysql.py 2026-11-04 14:01:56 +08:00
33a0dc6014 Update my.cnf 2026-11-04 13:57:38 +08:00
95a6f86e5d Update sql_mysql.py 2026-11-04 13:52:16 +08:00
74ac55b01d Update info.json 2026-11-04 13:50:19 +08:00
518cc78670 Update none.conf 2026-11-04 13:45:04 +08:00
43727decf0 update 2026-11-04 13:12:33 +08:00
599b3a7f4a Update install.sh 2026-11-04 13:05:29 +08:00
bf6c18c57a Update install.sh 2026-11-04 13:04:06 +08:00
34838bb238 update 2026-11-04 12:58:55 +08:00
1a356e516c Update index.py 2026-11-04 12:45:23 +08:00
15e273aa6f Update index.py 2026-11-04 12:44:21 +08:00
Mr Chen
4c3d3bf41d Merge pull request #963 from midoks/dev
常规优化
2026-11-04 12:43:49 +08:00
f782bacc64 update 2026-11-04 12:41:48 +08:00
7e62ab62f9 Update index.py 2026-11-04 11:45:38 +08:00
aaa8644348 Update mariadb.js 2026-11-04 11:43:26 +08:00
53797c7f56 Update index.py 2026-11-04 11:42:18 +08:00
c9302f406e Update my.cnf 2026-11-04 11:10:00 +08:00
7ad881c8ad mysql 同时过滤系统表
replicate-wild-ignore-table = mysql.%
replicate-wild-ignore-table = information_schema.%
replicate-wild-ignore-table = performance_schema.%
replicate-wild-ignore-table = sys.%
2026-11-04 11:06:28 +08:00
015e57f96d update 2026-11-04 10:21:48 +08:00
84b94a172e Update index.py 2026-11-04 10:11:25 +08:00
c1380945ef Update index.py 2026-11-04 10:11:02 +08:00
2d80df003e Update my5.7.cnf 2026-11-04 01:16:28 +08:00
568cdaa0ad Update my5.7.cnf 2026-11-04 01:13:19 +08:00
d11e4807df Update my5.7.cnf 2026-11-04 01:12:00 +08:00
Mr Chen
f6bc08cec1 Merge pull request #962 from midoks/dev
update
2026-11-04 00:47:06 +08:00
d723afb96e update 2026-11-04 00:26:05 +08:00
Mr Chen
6c2aa089f3 Merge pull request #961 from midoks/dev
常规优化
2026-11-04 00:06:02 +08:00
35e1ff2e96 update 2026-11-04 00:04:52 +08:00
bee9e89ed5 Update index.py 2026-11-03 22:46:33 +08:00
d0b622906f Update index.py 2026-11-03 22:37:34 +08:00
56f7edcb55 update 2026-11-03 22:36:17 +08:00
4acbc0363f Merge branch 'master' into dev 2026-11-03 22:26:50 +08:00
79013db685 Merge branch 'master' into dev 2026-11-03 22:19:05 +08:00
Mr Chen
eb5b5e5ce8 Merge pull request #960 from midoks/dev
常规更新
2026-11-03 22:16:20 +08:00
b9e6469635 update 2026-11-03 22:04:11 +08:00
56ab927f8c update 2026-11-03 21:56:19 +08:00
3d74320e76 update 2026-11-03 21:25:14 +08:00
0371eaa37a Update index.py 2026-11-03 17:01:41 +08:00
713dbfcda5 Update index.py 2026-11-03 16:47:50 +08:00
93ef2848ed Update mariadb.js 2026-11-03 16:38:47 +08:00
8750cf0f74 Update mariadb.js 2026-11-03 16:38:38 +08:00
af32a1e54d Update index.py 2026-11-03 16:23:42 +08:00
2a7c63029a Update index.py 2026-11-03 15:56:48 +08:00
f8fe7bea19 Update index.py 2026-11-03 15:55:08 +08:00
ef2814bafe Update index.py 2026-11-03 14:14:09 +08:00
220fef5f4d Update index.py 2026-11-03 14:13:36 +08:00
2835c111d0 update 2026-11-03 14:10:41 +08:00
6d0dcf3112 Update index.py 2026-11-03 14:06:44 +08:00
28307ce8e8 Update index.py 2026-11-03 14:01:04 +08:00
282fbed37d Update index.py 2026-11-03 13:53:13 +08:00
101b6d06bc Update mysql-community.js 2026-11-03 13:46:27 +08:00
8de4c74696 update 2026-11-03 13:45:35 +08:00
ba62972820 update 2026-11-03 13:34:34 +08:00
ec512f50af update 2026-11-03 13:08:43 +08:00
3261f54649 update 2026-11-03 12:28:50 +08:00
ec38ba9e21 update 2026-11-03 12:22:57 +08:00
9e1dc94a08 Update install.sh 2026-11-03 12:19:41 +08:00
40a76ac81e 主从同步模式 切换功能 2026-11-03 12:12:16 +08:00
721245b9ad Update my26.10.cnf 2026-11-03 12:02:37 +08:00
cb4ae9b74f Update my26.7.cnf 2026-11-03 12:01:15 +08:00
Mr Chen
5524ecf4e0 Merge pull request #959 from midoks/dev
常规更新
2026-11-03 12:00:47 +08:00
dbb2718892 update 2026-11-03 11:59:39 +08:00
88fc903d80 update 2026-11-03 11:56:07 +08:00
Mr Chen
242c30f7cb Merge pull request #958 from midoks/dev
常规更新
2026-11-03 11:29:36 +08:00
c944b7c585 update 2026-11-03 11:17:45 +08:00
dc2e2695be update 2026-11-03 11:05:28 +08:00
f5b86ea189 update 2026-11-03 11:04:36 +08:00
b6c2f7f3a1 Update index.py 2026-11-03 10:57:31 +08:00
81003f75b7 Update backup.py 2026-11-03 10:55:25 +08:00
d6dc330083 Update postgresql.js 2026-11-03 10:53:49 +08:00
fd0cbe10fc update 2026-11-03 10:51:15 +08:00
4ed77e82be update 2026-11-03 10:29:58 +08:00
Mr Chen
de0e89f056 Merge pull request #957 from midoks/dev
常规优化
2026-11-03 10:22:32 +08:00
29da5146f6 数据类开启卸载检查 2026-11-03 10:19:24 +08:00
e951089b45 Update index.py 2026-11-03 10:14:05 +08:00
909d65ad83 update 2026-11-03 10:13:20 +08:00
27cac55b8f Update index.py 2026-11-03 10:06:26 +08:00
0ee6ae3713 Update index.py 2026-11-03 09:58:32 +08:00
fb97160cfb Update index.py 2026-11-03 09:58:04 +08:00
96b00526fe Update install.sh 2026-11-03 09:55:18 +08:00
909fe6d0f1 Update sql_postgresql.py 2026-11-03 09:54:01 +08:00
f2e9f4c5e8 update 2026-11-03 09:52:15 +08:00
3b629b1296 Merge branch 'master' into dev 2026-11-02 23:51:58 +08:00
5cee415030 Merge branch 'master' into dev 2026-11-02 23:49:49 +08:00
Mr Chen
141e52d42a Merge pull request #956 from midoks/dev
常规更新
2026-11-02 23:48:47 +08:00
1b21f3c814 Update app.js 2026-11-02 23:46:15 +08:00
4ddc2fef8e update 2026-11-02 23:42:40 +08:00
18b259a5a5 Update app.js 2026-11-02 23:35:06 +08:00
2e2288a691 update 2026-11-02 23:32:29 +08:00
d03ae1db7b Update app.js 2026-11-02 23:15:15 +08:00
418355a571 update 2026-11-02 23:12:34 +08:00
340b53aa62 update 2026-11-02 23:01:21 +08:00
dd0628a7fb Update install.sh 2026-11-02 22:50:47 +08:00
3e5b48d2ad Update index.py 2026-11-02 22:28:54 +08:00
Mr Chen
815148a722 Merge pull request #955 from midoks/dev
常规优化
2026-11-02 22:21:33 +08:00
47aadfd877 Merge branch 'master' into dev 2026-11-02 22:19:31 +08:00
42bfd9a934 update 2026-11-02 22:01:40 +08:00
55df1b7613 Update backup.py 2026-11-02 21:50:01 +08:00
6bc3fc5707 Update index.py 2026-11-02 21:42:33 +08:00
19771181dd update 2026-11-02 21:42:27 +08:00
f0b65332bd Update index.py 2026-11-02 21:28:35 +08:00
7dd8a1eb4f Update index.py 2026-11-02 21:24:39 +08:00
f584c18d7e Update index.py 2026-11-02 21:16:53 +08:00
b023044473 Update index.py 2026-11-02 21:13:07 +08:00
dfa7ffdb53 Update index.py 2026-11-02 21:08:45 +08:00
a5a6eb7e5f update 2026-11-02 21:07:24 +08:00
eac88f1d26 update 2026-11-02 21:03:09 +08:00
518f693948 Update index.py 2026-11-02 20:56:05 +08:00
43684e9b20 update 2026-11-02 20:53:54 +08:00
59a7bb5584 update 2026-11-02 20:49:31 +08:00
f623fd9dcf Update postgresql.js 2026-11-02 20:41:50 +08:00
9db36d45af update 2026-11-02 20:33:57 +08:00
ff5670797a Update backup.py 2026-11-02 20:31:56 +08:00
54ad7e5fd0 update 2026-11-02 20:10:08 +08:00
2970aa4b8c Update index.py 2026-11-02 20:08:36 +08:00
d2e5751542 Update index.py 2026-11-02 20:07:59 +08:00
ba5f6f4958 Update index.py 2026-11-02 20:07:11 +08:00
b220552f92 update 2026-11-02 20:04:47 +08:00
d02981cee5 Update backup.py 2026-11-02 19:46:25 +08:00
96d5246415 Update index.py 2026-11-02 19:35:17 +08:00
ea284049c0 update 2026-11-02 19:02:40 +08:00
5c44bb10d1 Update index.py 2026-11-02 18:55:21 +08:00
c7c834fb75 Update postgresql.js 2026-11-02 18:55:16 +08:00
2ade5e490c update 2026-11-02 18:40:38 +08:00
6c61d3f3c0 Update postgresql.js 2026-11-02 18:30:25 +08:00
ab19878a80 Update mw.tpl 2026-11-02 18:11:02 +08:00
c27abfde3c Update install_mac.sh 2026-11-02 17:54:06 +08:00
411b21cdec Update install_mac.sh 2026-11-02 17:48:46 +08:00
26e21e631d update 2026-11-02 17:46:47 +08:00
Mr Chen
653068f2c2 Merge pull request #954 from midoks/dev
常规优化
2026-11-02 17:42:54 +08:00
188c63826f mysql-community mac 2026-11-02 17:41:02 +08:00
1820fc724f Update install.sh 2026-11-02 17:32:37 +08:00
645519b983 update 2026-11-02 17:27:57 +08:00
f97e015bbc update 2026-11-02 17:22:03 +08:00
9d47a385f5 update 2026-11-02 16:56:59 +08:00
ca06c68d24 update 2026-11-02 16:53:59 +08:00
841873418c update 2026-11-02 16:32:58 +08:00
05a6f093ab update 2026-11-02 16:31:45 +08:00
a916104d33 update 2026-11-02 16:30:09 +08:00
4609c360ac mongodb命令导入 2026-11-02 16:18:22 +08:00
b3acf3647f Update mysql.js 2026-11-02 16:10:51 +08:00
400c9d1276 Update mysql.js 2026-11-02 15:09:57 +08:00
Mr Chen
59bd655bb1 Merge pull request #953 from midoks/dev
常规优化
2026-11-02 07:52:20 +08:00
8227253b74 update 2026-11-02 07:42:26 +08:00
4e5604dc27 Update mariadb.js 2026-11-02 07:36:44 +08:00
2e238e6982 Update index.py 2026-11-02 07:33:01 +08:00
c5df0f256c Update index.py 2026-11-02 07:32:03 +08:00
6bd73131ce Update index.py 2026-11-02 07:29:19 +08:00
309422a41c update 2026-11-02 07:26:34 +08:00
6aa7d9dc20 update 2026-11-02 07:24:45 +08:00
565e1cc882 Update index.py 2026-11-02 07:24:33 +08:00
Mr Chen
5c1e292da9 Merge pull request #952 from midoks/dev
常规优化
2026-11-01 19:44:53 +08:00
6db1ee133d update 2026-11-01 19:35:10 +08:00
Mr Chen
383cec2ee5 Merge pull request #951 from midoks/dev
兼容更新+mysql备份可指定到表备份
2026-11-01 15:45:08 +08:00
dfa2163407 Update plugin.py 2026-11-01 15:32:23 +08:00
ed9a9b7860 Update plugin.py 2026-11-01 15:26:22 +08:00
5af49dc081 Merge branch 'master' into dev 2026-11-01 14:51:45 +08:00
d4f425abf8 备份不走sqlite了 2026-11-01 14:49:39 +08:00
1867ee01f1 update 2026-11-01 14:45:00 +08:00
81fe83e0a1 update 2026-11-01 14:31:42 +08:00
f266ec86c0 Create backup.py 2026-11-01 14:22:44 +08:00
e5d6357fae update 2026-11-01 14:20:52 +08:00
7967b36088 Update backup.py 2026-11-01 14:03:52 +08:00
d7471fe882 Update index.py 2026-11-01 13:56:19 +08:00
b4b67c8f48 update 2026-11-01 13:56:02 +08:00
63ae895f12 Update index.py 2026-11-01 13:53:27 +08:00
5dd77ee747 Update backup.py 2026-11-01 13:50:33 +08:00
6071dfa5f1 Update index.py 2026-11-01 13:46:01 +08:00
11d8d813d2 update 2026-11-01 13:40:40 +08:00
f337a60dc1 Update index.py 2026-11-01 13:16:07 +08:00
33f66ab3b1 Update index.py 2026-11-01 13:14:27 +08:00
eb71732d20 Update index.py 2026-11-01 13:07:09 +08:00
fbc9340960 Update index.py 2026-11-01 13:01:15 +08:00
a2f14f4121 Update index.py 2026-11-01 12:26:38 +08:00
ce8c7474ce Update backup.py 2026-11-01 12:24:13 +08:00
85d9f1409a Update index.py 2026-11-01 12:19:10 +08:00
c29dfee004 Update backup.py 2026-11-01 12:12:04 +08:00
618f938462 update 2026-11-01 12:08:34 +08:00
4e7927f9bc Update crontab.py 2026-11-01 03:24:26 +08:00
212f29438d Update crontab.py 2026-11-01 03:16:28 +08:00
3b6d9c3310 Update crontab.py 2026-11-01 03:15:13 +08:00
c01cb01d71 Update crontab.py 2026-11-01 03:14:31 +08:00
712863b766 Update crontab.py 2026-11-01 03:11:14 +08:00
601a80950f Update crontab.py 2026-11-01 03:10:21 +08:00
9f46ceac33 Update crontab.js 2026-11-01 03:08:58 +08:00
ad9b9be7fe Update crontab.py 2026-11-01 03:05:36 +08:00
2be6ac36ef Update crontab.py 2026-11-01 03:04:11 +08:00
fdb8ca205f Update crontab.py 2026-11-01 03:01:49 +08:00
f1024c165a Update crontab.py 2026-11-01 02:58:01 +08:00
9efc85f10d Update crontab.py 2026-11-01 02:52:33 +08:00
dd592b40ee Update crontab.py 2026-11-01 02:52:02 +08:00
9103646150 Update crontab.py 2026-11-01 02:50:05 +08:00
cae2680862 Update crontab.py 2026-11-01 02:48:41 +08:00
e3099a946b Update crontab.py 2026-11-01 02:44:49 +08:00
3f1da50025 Update crontab.py 2026-11-01 02:41:36 +08:00
fbd70eb4f9 Update crontab.py 2026-11-01 02:40:11 +08:00
ef0d6d5265 Update crontab.py 2026-11-01 02:36:43 +08:00
1e6932cd01 Update crontab.py 2026-11-01 02:36:08 +08:00
d173586d49 Update crontab.py 2026-11-01 02:28:51 +08:00
717269dadc Update crontab.py 2026-11-01 02:25:23 +08:00
21c4f93e02 Update crontab.py 2026-11-01 02:18:09 +08:00
c36a03bfb3 Update index.py 2026-11-01 02:12:49 +08:00
a71927917c Update index.py 2026-11-01 02:06:55 +08:00
2f5d5835c5 Update config.inc.php 2026-11-01 01:46:11 +08:00
e95b42df77 Update __init__.py 2026-11-01 01:41:09 +08:00
5c6dbbbb0c Update index.py 2026-11-01 01:27:59 +08:00
a151516eab Update index.py 2026-11-01 01:16:10 +08:00
3a590c7feb Update index.py 2026-11-01 01:12:08 +08:00
e9f0e1962e update 2026-11-01 01:10:39 +08:00
c4fda1362d Update mw.py 2026-11-01 01:05:35 +08:00
f31343b2a5 Update index.py 2026-11-01 01:00:10 +08:00
90b414d373 Update index.py 2026-11-01 00:55:03 +08:00
3eab70db4c Update index.py 2026-11-01 00:46:11 +08:00
e0810bb8d6 Update index.py 2026-11-01 00:45:15 +08:00
96a32d5c8f 更加公用 2026-11-01 00:44:10 +08:00
d45cfb5fe8 Update crontab.js 2026-11-01 00:29:32 +08:00
08753ae96d mysql支持表备份 2026-11-01 00:27:45 +08:00
465e55848f Update crontab.py 2026-10-31 23:51:28 +08:00
4492a97155 Update crontab.js 2026-10-31 23:41:38 +08:00
ba46d568bf Update crontab.js 2026-10-31 22:55:35 +08:00
d87d5d5349 Update crontab.js 2026-10-31 18:54:29 +08:00
76ea3e3375 update 2026-10-31 18:54:26 +08:00
ef47145135 Update crontab.js 2026-10-31 18:12:30 +08:00
43a9ee7368 Update crontab.py 2026-10-31 18:12:24 +08:00
6646e0c46c Update crontab.py 2026-10-31 18:01:10 +08:00
535dbb2e37 Update __init__.py 2026-10-31 18:01:03 +08:00
035953c7f5 Update install.sh 2026-10-31 18:00:28 +08:00
6a9ce81d46 update 2026-10-31 17:16:19 +08:00
f2a6824632 Update ssh_terminal.py 2026-10-31 11:57:54 +08:00
594976373e Update requirements.txt 2026-10-31 11:54:09 +08:00
45704f1c31 update 2026-10-30 17:07:22 +08:00
ce57885343 Create rapira85.toml 2026-10-30 16:55:33 +08:00
4d143ef959 Update crontab.js 2026-10-30 10:47:18 +08:00
9a0f9a759c Update install.sh 2026-10-30 10:10:34 +08:00
6341f00f46 update 2026-10-30 10:09:58 +08:00
f517568251 Update crontab.js 2026-10-29 21:02:44 +08:00
1ff6d0c2cb Update crontab.js 2026-10-29 19:17:44 +08:00
5e28039573 update 2026-10-29 18:36:48 +08:00
Mr Chen
d7757bee0d Merge pull request #949 from midoks/dev
update
2026-10-29 12:01:57 +08:00
6b18511708 Update install.sh 2026-10-29 12:00:41 +08:00
4a3e0791d3 update 2026-10-29 11:52:00 +08:00
7c25d3f6c3 Update install.sh 2026-10-29 11:41:54 +08:00
8ef38674d7 Update install.sh 2026-10-29 11:24:40 +08:00
e84cbf1d76 Update install.sh 2026-10-29 11:24:24 +08:00
14f622d252 Update install.sh 2026-10-29 11:16:08 +08:00
8bb2bfacdc Update install.sh 2026-10-29 11:13:52 +08:00
191c4b1331 Update install.sh 2026-10-29 11:11:41 +08:00
7bed2b977e update 2026-10-29 11:11:28 +08:00
b6c09b2b37 update 2026-10-29 11:03:15 +08:00
Mr Chen
1bd5251dc0 Merge pull request #948 from midoks/dev
更新优化
2026-10-28 10:40:32 +08:00
ecf1b6b600 Update install.sh 2026-10-27 23:03:09 +08:00
22cca82967 Update install.sh 2026-10-27 23:02:43 +08:00
cd66e42b1a Update install.sh 2026-10-27 23:00:26 +08:00
d887fa1b50 Update install.sh 2026-10-27 22:59:57 +08:00
55870ca08a Update my9.7.cnf 2026-10-27 22:51:21 +08:00
2ce1d49386 Update install_generic.sh 2026-10-27 22:47:35 +08:00
a0226ccbcd Update install_generic.sh 2026-10-27 22:47:02 +08:00
de7c14ec62 Update index.py 2026-10-27 22:42:03 +08:00
0c2cfd6d9a Update index.py 2026-10-27 22:41:21 +08:00
4ca78b9a91 Update my26.10.cnf 2026-10-27 22:37:56 +08:00
8219c2d2ed Update install_generic.sh 2026-10-27 22:31:47 +08:00
9f22ce949c Update install_generic.sh 2026-10-27 22:28:29 +08:00
d76c21c54b Update install_generic.sh 2026-10-27 22:28:12 +08:00
30c5cee81a update 2026-10-27 22:24:42 +08:00
e2d0ac6d89 update 2026-10-27 22:11:37 +08:00
3578a65d6e Update my9.7.cnf 2026-10-27 22:04:14 +08:00
c8331b800b update 2026-10-27 21:58:20 +08:00
1e7dc18c21 update 2026-10-27 21:46:06 +08:00
046da1868e Update install_generic.sh 2026-10-27 21:38:37 +08:00
ef7068ebd2 Update install_generic.sh 2026-10-27 21:37:47 +08:00
0525667032 Update install_generic.sh 2026-10-27 21:34:15 +08:00
6198ca02da Update install_generic.sh 2026-10-27 21:32:05 +08:00
4d4fd90fc6 Update install.sh 2026-10-27 21:29:58 +08:00
acfc4d710b Update install.sh 2026-10-27 21:29:43 +08:00
4fd12f4d73 update 2026-10-27 21:23:42 +08:00
9a8bb9f94b update 2026-10-27 21:22:30 +08:00
170f758bc9 Update install.sh 2026-10-27 21:19:34 +08:00
8b7d563fac update 2026-10-27 21:18:03 +08:00
6f9e0cdd8f update 2026-10-27 21:16:58 +08:00
0a3af7a0c0 Create install_generic.sh 2026-10-27 21:16:25 +08:00
c90a2facac update 2026-10-27 21:15:35 +08:00
92d56bddab update 2026-10-27 21:07:39 +08:00
a3bab2da47 Update install.sh 2026-10-27 21:02:19 +08:00
d51a3ac1f7 Update info.json 2026-10-27 20:45:25 +08:00
04774bddc3 update 2026-10-27 20:45:00 +08:00
770f1532da update 2026-10-27 17:47:37 +08:00
d09872c2f3 update 2026-10-27 17:30:36 +08:00
e77369cd25 Update install.sh 2026-10-27 17:12:00 +08:00
69897a208c update 2026-10-27 17:10:57 +08:00
1f5c5ac66e update 2026-10-27 17:08:36 +08:00
3a7f8f09cb Update opcache.sh 2026-10-26 13:13:39 +08:00
77d2b9e323 update 2026-10-26 13:11:27 +08:00
d56c271cc4 update 2026-10-26 04:16:03 +08:00
b4aecf5d0c update 2026-10-26 04:15:29 +08:00
e55e23c845 Update rapira.js 2026-10-26 04:05:37 +08:00
e2977dbbc4 Update mcrypt.sh 2026-10-26 04:04:34 +08:00
8ad94ffeff Update install.sh 2026-10-26 04:02:58 +08:00
c94ff04dcf update 2026-10-26 04:00:20 +08:00
65f10ca22f Update sodium.sh 2026-10-26 03:53:59 +08:00
a1127b3bc0 Update sodium.sh 2026-10-26 03:52:48 +08:00
81c16d1a3d update 2026-10-26 03:47:17 +08:00
b1b4c82457 Update rapira.toml 2026-10-26 03:46:09 +08:00
515b22b103 update 2026-10-26 03:45:19 +08:00
c200165057 update 2026-10-26 03:24:02 +08:00
64c30893d5 update 2026-10-26 03:09:50 +08:00
98b8dce5fd up 2026-10-26 03:06:09 +08:00
0d9b7b6edf Update gd_old.sh 2026-10-26 02:59:15 +08:00
b72bb1fa87 update 2026-10-26 02:58:58 +08:00
d85131266c update 2026-10-26 02:56:59 +08:00
22da275f5b up 2026-10-26 02:51:34 +08:00
f6d65b9e33 update 2026-10-26 02:49:41 +08:00
ebc07becd0 update 2026-10-26 02:48:03 +08:00
024f2c2369 update 2026-10-26 02:45:33 +08:00
2b93fb684b update 2026-10-26 02:43:27 +08:00
b2daf6bf65 update 2026-10-26 02:37:33 +08:00
3ee0f553e9 update 2026-10-26 02:26:03 +08:00
f206da8278 Update apcu.sh 2026-10-26 02:07:49 +08:00
edbaeb37f5 update 2026-10-26 02:07:42 +08:00
46847833d0 update 2026-10-26 01:57:13 +08:00
4303a62b1b update 2026-10-26 01:12:09 +08:00
d6d5babf81 Update dispatcher.toml 2026-10-26 00:46:27 +08:00
8e5b10bda3 Update worker.toml 2026-10-26 00:45:45 +08:00
8e54ee987c Update index.py 2026-10-26 00:42:09 +08:00
929b30ce73 update 2026-10-26 00:38:38 +08:00
c085fa7066 update 2026-10-26 00:30:21 +08:00
783e71f189 update 2026-10-26 00:18:37 +08:00
ae1ffd313c Update doh.conf 2026-10-25 22:46:56 +08:00
122c0b5f64 Update doh.conf 2026-10-25 12:53:13 +08:00
21e496f22e Update doh.conf 2026-10-25 12:52:25 +08:00
d92b3039e2 Update doh.conf 2026-10-25 12:49:37 +08:00
ea57812191 Update info.json 2026-10-25 12:46:02 +08:00
d72238df45 update 2026-10-25 12:45:22 +08:00
55aab8d86d Update install.sh 2026-10-25 12:34:49 +08:00
f8d4d9e4cf update 2026-10-25 12:32:30 +08:00
90afa6446c Update install.sh 2026-10-25 09:58:41 +08:00
5e468c548a Update install.sh 2026-10-25 09:58:16 +08:00
48f4521ef6 Update install.sh 2026-10-25 09:55:12 +08:00
ccd48cecfb update 2026-10-25 09:52:31 +08:00
0757638b2e Update install.sh 2026-10-25 09:46:55 +08:00
68cb547d5f update 2026-10-25 08:13:29 +08:00
1f7c494d82 Update install.sh 2026-10-24 14:58:04 +08:00
Mr Chen
8e58783964 Merge pull request #947 from midoks/dev
redis在线更新支持
2026-10-24 14:14:35 +08:00
bfdc0639b6 update 2026-10-24 14:12:33 +08:00
337a7d87e4 Update install.sh 2026-10-24 14:08:47 +08:00
38c062220c redis 在线升级支持 2026-10-24 14:01:26 +08:00
f639acec86 Merge branch 'master' into dev 2026-10-24 12:54:12 +08:00
02ba38a01a Update install.sh 2026-10-24 12:30:18 +08:00
ea8487b14c up 2026-10-24 12:27:40 +08:00
Mr Chen
f0b613865b Merge pull request #946 from midoks/dev
0.19.0
2026-10-24 10:37:42 +08:00
b142f37045 Update install.sh 2026-10-24 02:04:36 +08:00
45eeb3c045 update 2026-10-24 02:03:38 +08:00
ab99d972cd update 2026-10-24 01:44:03 +08:00
08562a12a2 Update install.sh 2026-10-24 01:37:52 +08:00
d7e62bbfa1 update 2026-10-24 01:36:21 +08:00
5829c48995 update 2026-10-24 01:33:12 +08:00
cd133fc278 update 2026-10-24 01:24:21 +08:00
8a2a4d1a84 update 2026-10-24 01:03:12 +08:00
Mr Chen
a225b98432 Merge pull request #945 from midoks/dev
优化
2026-10-24 01:01:25 +08:00
1acd50b3f3 Update install.sh 2026-10-24 00:59:41 +08:00
5279fe0ba7 Update soft.js 2026-10-24 00:56:26 +08:00
a73f7d86a9 Update version.py 2026-10-24 00:47:15 +08:00
5fe7e4b43d update 2026-10-24 00:43:18 +08:00
d50d666fb2 Update install.sh 2026-10-24 00:42:30 +08:00
86229586f1 update 2026-10-24 00:42:06 +08:00
2947dea3dd Merge branch 'master' into dev 2026-10-24 00:38:28 +08:00
264534ff2c update 2026-10-24 00:38:16 +08:00
82655592d7 Update index.py 2026-10-24 00:35:57 +08:00
Mr Chen
85f90e8ce6 Merge pull request #944 from midoks/dev
优化
2026-10-24 00:29:19 +08:00
450ae37f05 Update index.py 2026-10-24 00:22:55 +08:00
07d0eff75b update 2026-10-24 00:16:33 +08:00
8697bea0d3 Update info.json 2026-10-23 23:59:14 +08:00
a06839fe20 Update info.json 2026-10-23 23:55:31 +08:00
6542113a21 Merge branch 'master' into dev 2026-10-23 23:53:11 +08:00
63d04b8c75 update 2026-10-23 23:50:05 +08:00
71b409a970 update 2026-10-23 23:48:31 +08:00
e0bcc720cc Update soft.html 2026-10-23 23:44:27 +08:00
8bcabd055b update 2026-10-23 23:38:02 +08:00
94597476ac update 2026-10-23 23:33:27 +08:00
a5172d4b5a update 2026-10-23 23:10:50 +08:00
ee79ea55db update 2026-10-23 23:04:31 +08:00
2230c2b632 update 2026-10-23 22:48:12 +08:00
9b231554ef update 2026-10-23 22:43:49 +08:00
ccc499359b Update fcgi_client.py 2026-10-23 22:38:02 +08:00
c5ba0dd8a2 openresty 支持在线升级 2026-10-23 22:31:44 +08:00
3811979f7e update 2026-10-23 22:14:26 +08:00
fb17b7e3a1 update 2026-10-23 22:08:10 +08:00
6ea79b8b28 支持插件更新功能 2026-10-23 22:03:48 +08:00
037e360e3d Update install.sh 2026-10-23 21:49:47 +08:00
3e4a995d5a Update info.json 2026-10-23 21:42:51 +08:00
9d7056184a Update public.js 2026-10-23 21:40:37 +08:00
8aad54b2eb Update index.py 2026-10-23 21:37:41 +08:00
9639dc0e19 Merge branch 'master' into dev 2026-10-23 19:45:14 +08:00
Mr Chen
1f816c4c09 Merge pull request #943 from midoks/dev
简单优化
2026-10-23 19:44:27 +08:00
d88c3d812e Create e.cfg 2026-10-23 19:40:00 +08:00
de3f060e8b Update requirements.txt 2026-10-23 19:32:50 +08:00
2c740726e2 Update lib.sh 2026-10-23 19:31:53 +08:00
01fcadf7c9 update 2026-10-23 19:30:25 +08:00
21378014c4 Update lib.sh 2026-10-23 19:29:50 +08:00
765e3d7d1a Update lib.sh 2026-10-23 19:29:11 +08:00
2bd77e5830 update 2026-10-23 19:20:46 +08:00
b5c61af33c Update plugin.py 2026-10-23 18:13:14 +08:00
ac7df862c1 Update info.json 2026-10-23 14:12:40 +08:00
ae30e8c740 update 2026-10-23 13:29:04 +08:00
db4cd40e35 Update sql_mysql.py 2026-10-23 13:19:34 +08:00
592cdc3e17 Update soft.html 2026-10-23 12:09:24 +08:00
Mr Chen
9a84276abf Merge pull request #942 from midoks/dev
优化
2026-10-22 16:52:22 +08:00
1c70d6381b Merge branch 'master' into dev 2026-10-22 16:51:48 +08:00
556da39be8 Update install.sh 2026-10-22 15:53:22 +08:00
59c8d02c7d Update install.sh 2026-10-22 15:52:03 +08:00
3b0b53d1b5 update 2026-10-22 15:44:47 +08:00
996cbfb279 Update install.sh 2026-10-22 15:37:43 +08:00
e47ad14cb1 Update install.sh 2026-10-22 15:36:50 +08:00
8921647180 update 2026-10-22 15:35:12 +08:00
Mr Chen
2d7933e715 Merge pull request #941 from midoks/dev
局部优化
2026-10-22 14:15:00 +08:00
cffe463779 update 2026-10-22 14:00:45 +08:00
2a0e7c090d Update install.sh 2026-10-22 13:47:58 +08:00
eab8ed9551 Update install.sh 2026-10-22 13:46:50 +08:00
Mr Chen
e9c3b5d135 Merge pull request #940 from midoks/dev
php 支持手动升级
2026-10-22 12:38:02 +08:00
59076d4750 update 2026-10-22 12:36:43 +08:00
8aa84d22a8 Update install.sh 2026-10-22 12:28:35 +08:00
cfb26034b1 Update install.sh 2026-10-22 12:27:30 +08:00
953980ee47 Update install.sh 2026-10-22 12:26:27 +08:00
994198517a Update install.sh 2026-10-22 12:26:07 +08:00
98728b2eb8 Update install.sh 2026-10-22 12:23:49 +08:00
6498606e69 update 2026-10-22 12:23:29 +08:00
Mr Chen
d17ba4d785 Merge pull request #939 from midoks/dev
php升级
2026-10-22 12:00:07 +08:00
e4eeed3559 update 2026-10-22 11:59:23 +08:00
b100204b37 Update rapira.toml 2026-10-18 11:01:26 +08:00
82ff3e3d0a Update rapira.js 2026-10-17 14:38:47 +08:00
0b2223bce0 Update rapira.js 2026-10-17 14:35:50 +08:00
a43b723b09 Update rapira.js 2026-10-17 14:34:17 +08:00
96551f49ca Update rapira.js 2026-10-17 14:32:51 +08:00
8e32d37985 Update rapira.toml 2026-10-17 14:21:49 +08:00
d1da238ddc update 2026-10-17 14:07:59 +08:00
7260a2be21 Create rapira.conf 2026-10-17 14:02:10 +08:00
7562d50e58 Update phpinfo.conf 2026-10-17 13:29:05 +08:00
e77ae8763b Update index.py 2026-10-17 13:28:22 +08:00
a0e51c75fe Update index.py 2026-10-17 13:22:00 +08:00
6021a5e6e2 Update enable-rapira.conf 2026-10-17 13:12:48 +08:00
e50e222955 Update index.py 2026-10-17 13:07:00 +08:00
531dd665c9 update 2026-10-17 13:02:17 +08:00
a79c0a1a9b update 2026-10-17 11:41:47 +08:00
9ef144c304 Update rapira.toml 2026-10-16 12:58:36 +08:00
5402af8df7 Update index.py 2026-10-16 12:38:11 +08:00
99802125dc Update index.py 2026-10-16 12:37:51 +08:00
705647cd3b Update rapira.toml 2026-10-16 11:54:05 +08:00
0ea2eeab7f Update rapira.toml 2026-10-16 11:53:31 +08:00
727cde1352 Update rapira.toml 2026-10-16 11:53:11 +08:00
6ef6358cbb update 2026-10-16 11:44:30 +08:00
6acb303ac9 update 2026-10-16 11:32:27 +08:00
a80e5492b8 Update index.html 2026-10-16 11:24:05 +08:00
4358b1a520 update 2026-10-16 11:11:00 +08:00
ad1a7c22a6 Update index.py 2026-10-16 11:01:33 +08:00
2f3af23e6d Update index.html 2026-10-15 16:23:17 +08:00
89a26d294d Update public.js 2026-10-15 15:43:36 +08:00
f83faeacac update 2026-10-15 15:42:08 +08:00
fb7c27c205 Update index.py 2026-10-15 15:37:08 +08:00
3f958c7083 Update index.html 2026-10-15 15:33:09 +08:00
60b6689318 Update index.py 2026-10-15 15:32:29 +08:00
ba94e81367 update 2026-10-15 15:05:36 +08:00
89c8c68b88 Update requirements.txt 2026-10-15 15:00:58 +08:00
e78ae7e4de Update requirements.txt 2026-10-15 15:00:32 +08:00
f87cadd3ce Update index.html 2026-10-15 14:59:44 +08:00
1631e149ea Update index.py 2026-10-15 14:58:02 +08:00
d84f585bff Update index.py 2026-10-15 14:52:00 +08:00
7e9091b341 update 2026-10-15 14:51:02 +08:00
7020d3e198 Update install.sh 2026-10-15 14:39:55 +08:00
9d8e0ded8f Update install.sh 2026-10-15 14:25:05 +08:00
090e8fa160 Create rapira.source.toml 2026-10-15 14:20:21 +08:00
83746675e7 Update install.sh 2026-10-15 14:19:57 +08:00
74d73d76cd Update index_php.py 2026-10-13 13:03:48 +08:00
6bfedde66d Update install.sh 2026-10-13 13:02:00 +08:00
554bee4040 Update install.sh 2026-10-13 13:01:27 +08:00
a1005adf04 Update install.sh 2026-10-13 11:43:52 +08:00
cbed47d825 update 2026-10-13 10:55:20 +08:00
abb7da896b Update index.py 2026-10-11 15:39:00 +08:00
e62a69ac45 update 2026-10-11 15:31:57 +08:00
769285736b update 2026-10-11 15:29:04 +08:00
8d2eaa94bd Update index.html 2026-10-11 15:07:48 +08:00
a31143e0e8 Update install.sh 2026-10-11 15:05:22 +08:00
584551f764 update 2026-10-11 15:04:11 +08:00
8b60a65bbd Update index.py 2026-10-11 14:52:34 +08:00
c13df7c25b Update index.py 2026-10-11 14:52:08 +08:00
ad30ba776c Update index.py 2026-10-11 14:51:43 +08:00
de3451993f Update install.sh 2026-10-11 14:45:56 +08:00
fde9b49f39 Update rapira.service.tpl 2026-10-11 14:39:51 +08:00
cff0e9442c Update install.sh 2026-10-11 14:34:11 +08:00
5cb57d89de Update install.sh 2026-10-11 14:29:32 +08:00
fadcbaa1bb Update install.sh 2026-10-11 14:29:01 +08:00
911554f6df Update install.sh 2026-10-11 14:27:46 +08:00
77b525d955 Update install.sh 2026-10-11 14:19:44 +08:00
b872a2bb53 Update install.sh 2026-10-11 14:19:29 +08:00
818444d4f4 Update install.sh 2026-10-11 14:17:47 +08:00
63e16e05aa Update install.sh 2026-10-11 13:56:53 +08:00
06743894a3 Update install.sh 2026-10-11 12:48:56 +08:00
2d665235c8 update 2026-10-11 12:43:17 +08:00
72311a2801 update 2026-10-09 12:42:45 +08:00
d7ba290ed3 up 2026-10-09 11:08:59 +08:00
e0d2984bae Update install.sh 2026-10-09 10:51:30 +08:00
ecdbe8d014 Update install.sh 2026-10-09 10:40:39 +08:00
7d57e320b8 Update install.sh 2026-10-09 10:40:27 +08:00
cf16b729f6 Create install.sh 2026-10-09 10:01:12 +08:00
366c5c91aa Update install.sh 2026-10-09 09:37:39 +08:00
173cf2985e Update install.sh 2026-10-09 09:17:39 +08:00
0bdba73f25 Update install.sh 2026-10-09 09:14:55 +08:00
24d25e69ad Update install.sh 2026-10-09 09:09:41 +08:00
d3e6297503 Update site.css 2026-10-08 21:30:53 +08:00
76b5f15115 update 2026-10-08 19:17:46 +08:00
cfa92b637a update 2026-10-08 18:52:56 +08:00
f07e75e508 init rapira 2026-10-08 18:42:21 +08:00
4220300731 Update site.css 2026-09-22 19:11:55 +08:00
Mr Chen
43b464866f Merge pull request #938 from midoks/dev
HDD和SSD磁盘识别
2026-09-22 16:31:43 +08:00
7bf5dbb4f3 Update site.css 2026-09-22 16:13:41 +08:00
9fe8453898 Update index.js 2026-09-22 16:05:43 +08:00
b421cf261f Update index.js 2026-09-22 16:02:45 +08:00
75d28763ee Update index.js 2026-09-22 15:58:28 +08:00
25533fa8bc Update main.py 2026-09-22 15:34:24 +08:00
04294e6cbe Update main.py 2026-09-22 15:28:38 +08:00
f0550ba6b3 Update main.py 2026-09-22 15:21:43 +08:00
88d0733d95 Update install.sh 2026-09-13 13:17:11 +08:00
74633e155a update 2026-09-13 12:59:14 +08:00
7d8d7a8c6f Create openssl_40.sh 2026-09-13 10:32:35 +08:00
Mr Chen
32956578b2 Merge pull request #937 from midoks/dev
bash符合标准
2026-09-11 22:52:09 +08:00
4efdf7606c update 2026-09-11 22:48:34 +08:00
a61644861b update 2026-09-11 22:39:42 +08:00
e60570e380 update 2026-09-11 22:25:42 +08:00
ad160cb23e update 2026-09-11 22:10:30 +08:00
73f58ced9a update 2026-09-11 21:57:55 +08:00
36ca82c1b4 update 2026-09-11 21:52:24 +08:00
acd46f4724 update 2026-09-11 21:28:59 +08:00
370ff99134 update 2026-09-11 21:10:03 +08:00
aa317ee2f5 update 2026-09-11 20:47:27 +08:00
44600b5657 update 2026-09-11 20:42:39 +08:00
ea45316a32 update 2026-09-11 20:32:22 +08:00
6cd13022f1 Update install.sh 2026-09-11 20:31:05 +08:00
91ff2f7550 update 2026-09-11 20:30:55 +08:00
483b5b090d Update install.sh 2026-09-11 20:18:46 +08:00
6087931c58 Update install.sh 2026-09-11 20:18:28 +08:00
9014fd8911 Update install.sh 2026-09-11 20:18:07 +08:00
76f7f51d80 Update install.sh 2026-09-11 20:15:43 +08:00
0c4902e01e Update install.sh 2026-09-11 20:13:34 +08:00
175fb089cd Update install.sh 2026-09-11 20:13:11 +08:00
7b8a4a38b3 Update install.sh 2026-09-11 20:12:33 +08:00
ebf920ed12 Update install.sh 2026-09-11 20:08:55 +08:00
bb8591f5e5 update 2026-09-11 20:06:25 +08:00
b8573e1f1f Update plugin.py 2026-09-11 20:04:59 +08:00
dacc1e5ad8 update 2026-09-11 20:00:47 +08:00
8cc64e32dd update 2026-09-11 19:55:44 +08:00
1d294cc3b1 Update index.py 2026-09-11 19:51:42 +08:00
f9da2e4391 update 2026-09-11 19:46:15 +08:00
3b78079cd2 Update install.sh 2026-09-11 19:35:40 +08:00
07a0a1be48 Update install.sh 2026-09-11 19:31:44 +08:00
837f95e571 Merge branch 'master' into dev 2026-09-09 01:45:29 +08:00
Mr Chen
909d818caa Merge pull request #936 from ramondelee/patch-2
Update freetype_new.sh
2026-09-09 01:44:12 +08:00
ramondelee
355ceebbd7 Update freetype_new.sh
修复freetype下载失败问题
2026-09-08 21:12:36 +08:00
6ae1370709 Merge branch 'master' into dev 2026-09-08 12:02:31 +08:00
Mr Chen
93b5d8b8b4 Merge pull request #935 from ramondelee/patch-1
Update freetype_old.sh
2026-09-08 12:02:10 +08:00
ramondelee
be461a15a9 Update freetype_old.sh
修复freetype下载失败问题
2026-09-07 22:23:11 +08:00
c239f35382 Update firewall.py 2026-09-02 08:25:34 +08:00
49d57af719 Update linux.conf 2026-08-27 13:36:19 +08:00
Mr Chen
19fc0fdc51 Merge pull request #934 from midoks/dev
常规更新
2026-08-26 18:16:57 +08:00
c1fd4fa24c Update __init__.py 2026-08-26 18:15:43 +08:00
7239b22759 update 2026-08-16 00:14:39 +08:00
f5fa94ae95 Update update.sh 2026-08-08 10:09:28 +08:00
Mr Chen
b679ea035d Merge pull request #933 from midoks/dev
常规优化
2026-07-22 13:05:42 +08:00
49bbca8faa Update index.py 2026-07-22 13:03:46 +08:00
8b86cd5e63 up 2026-07-22 13:00:43 +08:00
698e3ffd81 update 2026-07-22 12:55:33 +08:00
Mr Chen
c2284dcee5 Merge pull request #932 from midoks/dev
兼容Ubuntu 26.04 LTS
2026-07-21 20:43:06 +08:00
b68c9edc3e Update index.py 2026-07-21 20:37:12 +08:00
650365997a Update index.py 2026-07-21 20:36:34 +08:00
3279404595 Update info.json 2026-07-21 20:35:41 +08:00
d32a94dccf Update install.sh 2026-07-21 20:34:44 +08:00
80d846f247 Update install.sh 2026-07-21 20:31:08 +08:00
eadcbe336d Update install.sh 2026-07-21 20:26:57 +08:00
474d0f075f Update install.sh 2026-07-21 20:26:33 +08:00
2d6a41e19f Update install.sh 2026-07-21 12:03:36 +08:00
1f24944417 Update caddy.service.tpl 2026-07-21 11:51:42 +08:00
4ab3409e54 Update index.py 2026-07-21 11:43:14 +08:00
c3ad146303 update 2026-07-21 11:38:30 +08:00
745cd304fb Update install.sh 2026-07-21 00:33:05 +08:00
e6efefd1fd Update install.sh 2026-07-21 00:11:57 +08:00
1350404c58 Update install.sh 2026-07-21 00:10:03 +08:00
9cdd2274fa Update install.sh 2026-07-21 00:08:53 +08:00
cc204ad721 Update install.sh 2026-07-21 00:00:26 +08:00
8eb1614b31 Update install.sh 2026-07-20 23:50:41 +08:00
9c2e9627ec update 2026-07-20 23:48:18 +08:00
87123c526a update 2026-07-20 23:45:15 +08:00
7c3ebc6e35 Update ubuntu.sh 2026-07-20 23:42:08 +08:00
6c5bf63424 Update ubuntu.sh 2026-07-20 23:38:00 +08:00
13fd47e7d4 Update ubuntu.sh 2026-07-20 23:36:38 +08:00
fc1321584a Update ubuntu.sh 2026-07-20 23:36:25 +08:00
bab3ae16d3 Update ubuntu.sh 2026-07-20 23:33:35 +08:00
ab8498e519 Update ubuntu.sh 2026-07-20 23:33:13 +08:00
0e480c7ad8 update 2026-07-20 23:29:01 +08:00
7ed8558ff0 Update ubuntu.sh 2026-07-20 23:22:35 +08:00
4ed2f0caa9 update 2026-07-20 23:19:31 +08:00
f275eabe1b Update file.py 2026-07-20 23:08:01 +08:00
fe13ab1e5f Update file.py 2026-07-20 23:07:46 +08:00
6ed045cf94 update 2026-07-20 22:41:10 +08:00
ef333ff142 update 2026-07-20 22:23:37 +08:00
dac2f5240f Update install.sh 2026-07-20 22:18:45 +08:00
cebfc2fc91 update 2026-07-20 22:17:22 +08:00
1da865c1b2 Update install.sh 2026-07-20 16:46:29 +08:00
2abdaaa7ce Update install.sh 2026-07-20 16:45:08 +08:00
c62142cf6b Update requirements.txt 2026-07-20 16:04:57 +08:00
7c1820b6cd update 2026-07-20 15:59:27 +08:00
a24af95d24 Update install.sh 2026-07-20 15:39:32 +08:00
1326c282c8 Update requirements.txt 2026-07-20 15:33:13 +08:00
b7e84749f1 Update debian.sh 2026-07-20 15:26:10 +08:00
8a65158540 Update db.py 2026-07-20 15:21:46 +08:00
a576c521a2 Update ubuntu.sh 2026-07-20 15:17:24 +08:00
736a387a71 Update ubuntu.sh 2026-07-20 15:15:23 +08:00
090205c372 update 2026-07-20 13:41:03 +08:00
fda0bddc8f Update db.py 2026-07-20 13:26:23 +08:00
292b18468d Update db.py 2026-07-20 13:24:57 +08:00
47aab245fc Update panel_task.py 2026-07-20 12:42:24 +08:00
39bd601825 Update mw.py 2026-07-20 12:32:39 +08:00
b744adeb13 Update monitor.py 2026-07-20 11:46:30 +08:00
7b70f9fc99 Merge branch 'master' into dev 2026-07-19 22:06:00 +08:00
Mr Chen
0723f751b3 Merge pull request #930 from midoks/dependabot/pip/python-engineio-4.13.2
Bump python-engineio from 4.3.2 to 4.13.2
2026-07-19 22:05:47 +08:00
1fd8617a12 Update push_notice_msg.py 2026-07-17 23:21:19 +08:00
dependabot[bot]
2fec8fcef4 Bump python-engineio from 4.3.2 to 4.13.2
Bumps [python-engineio](https://github.com/miguelgrinberg/python-engineio) from 4.3.2 to 4.13.2.
- [Release notes](https://github.com/miguelgrinberg/python-engineio/releases)
- [Changelog](https://github.com/miguelgrinberg/python-engineio/blob/main/CHANGES.md)
- [Commits](https://github.com/miguelgrinberg/python-engineio/compare/v4.3.2...v4.13.2)

---
updated-dependencies:
- dependency-name: python-engineio
  dependency-version: 4.13.2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-14 21:18:01 +00:00
Mr Chen
51a48afa71 Merge pull request #929 from ccbkkb/patch-1
Fix return statement for unban IP function
2026-07-13 13:12:38 +08:00
ccbkkb
76919faca7 Fix return statement for unban IP function 2026-07-13 10:50:19 +08:00
Mr Chen
9bcbeaf1a5 Merge pull request #928 from midoks/dev
常规更新
2026-07-09 17:11:23 +08:00
d0de121721 Update update.sh 2026-07-09 15:14:16 +08:00
957e2db3d0 Update update.sh 2026-07-09 15:06:33 +08:00
fb0be5549d Update update.sh 2026-07-09 15:04:40 +08:00
8a9132d557 Update update.sh 2026-07-09 14:52:08 +08:00
04d10435c2 Update update.sh 2026-07-09 14:51:29 +08:00
92543e10fa Update update.sh 2026-07-09 14:46:38 +08:00
cd427dcbf3 Update update.sh 2026-07-09 14:46:26 +08:00
Mr Chen
ddb5e0285b Merge pull request #927 from midoks/dev
常规更新
2026-07-09 14:24:08 +08:00
75610a4559 Update crontab.js 2026-07-09 14:22:26 +08:00
b8f7a45f61 Update push_notice_msg.py 2026-07-09 12:58:16 +08:00
Mr Chen
37d5ce719e Merge pull request #926 from midoks/dev
常规更新
2026-07-08 16:47:46 +08:00
ef9053aa7e Update webstats_index.py 2026-07-08 16:47:05 +08:00
018fcb7afb Update index.py 2026-07-08 16:46:45 +08:00
5cc9a67152 Update mw.py 2026-07-07 23:54:17 +08:00
54895f1d0a Update mw.py 2026-07-07 23:38:29 +08:00
91dfecf882 up 2026-07-07 23:36:34 +08:00
2f09e227d1 Update tool_migrate.py 2026-07-07 23:12:23 +08:00
5d0463836e Update mw.py 2026-07-07 23:11:02 +08:00
Mr Chen
fb6499cb35 Merge pull request #925 from midoks/dev
常规更新
2026-07-07 02:35:02 +08:00
0bbfb58e67 Update index.py 2026-07-07 02:32:34 +08:00
Mr Chen
fcd780a7d3 Merge pull request #924 from midoks/dev
常规更新
2026-07-07 02:19:41 +08:00
4f4d1e7580 Update webstats_common.lua 2026-07-07 02:15:57 +08:00
6e2a8e0a12 up 2026-07-07 02:12:09 +08:00
817b4b36c7 Update webstats.conf 2026-07-07 02:06:03 +08:00
Mr Chen
0ba89cbb9e Merge pull request #923 from midoks/dev
常规更新
2026-07-06 21:13:07 +08:00
4e3e7864be Update tool_migrate.py 2026-07-06 21:02:13 +08:00
6f51eaa298 update 2026-07-06 20:59:32 +08:00
39bd87e868 Update tool_migrate.py 2026-07-06 20:54:00 +08:00
18443aab60 Update tool_migrate.py 2026-07-06 20:49:20 +08:00
b88ea7aa3c update 2026-07-06 20:32:36 +08:00
6a6f6e6062 Update tool_migrate.py 2026-07-06 20:27:17 +08:00
5839dbcd6b Update tool_migrate.py 2026-07-06 20:05:10 +08:00
b46f45569e Update tool_migrate.py 2026-07-06 20:01:23 +08:00
5cdc5af8cd Update tool_migrate.py 2026-07-06 19:50:13 +08:00
4f38a9f3ff Update tool_migrate.py 2026-07-06 19:49:58 +08:00
9c83695187 Create tool_migrate.py 2026-07-06 19:44:14 +08:00
f9be534101 update 2026-07-06 19:24:36 +08:00
58ab48ac15 Update webstats_common.lua 2026-07-06 19:11:48 +08:00
f34e93192d Update webstats_common.lua 2026-07-06 19:10:17 +08:00
31106f2b13 Update webstats_common.lua 2026-07-06 19:03:27 +08:00
468cc54cf5 Update webstats_common.lua 2026-07-06 18:55:25 +08:00
728a38c55c Update webstats_log.lua 2026-07-06 18:35:05 +08:00
Mr Chen
b2b23b0e3b Merge pull request #922 from midoks/dev
常规更新
2026-07-05 15:51:08 +08:00
167dd11548 Update webstats_log.lua 2026-07-05 15:47:23 +08:00
03fdbf2604 Merge branch 'master' into dev 2026-07-05 15:43:18 +08:00
edbdec8370 Update init.sql 2026-07-05 15:42:44 +08:00
8f1c9f9471 up 2026-07-05 15:38:54 +08:00
d35d16943d up 2026-07-05 15:34:56 +08:00
3ac4270dee Update stats.js 2026-07-05 15:30:16 +08:00
90777e08ff update 2026-07-05 15:28:56 +08:00
b47d1262ac Update push_notice_msg.py 2026-07-05 15:11:57 +08:00
e28081a7c5 Update stats.js 2026-07-05 15:04:05 +08:00
5f7d6c1488 Create webstats_common.lua.bk1.txt 2026-07-05 14:46:32 +08:00
59385e11be Merge branch 'master' into dev 2026-07-05 14:21:28 +08:00
Mr Chen
a668d88791 Merge pull request #921 from midoks/dev
常规更新
2026-07-05 14:13:11 +08:00
e62bd7c5a6 Update webstats_log.lua 2026-07-05 14:07:31 +08:00
1ad3d2f187 Update webstats_log.lua 2026-07-05 13:41:19 +08:00
bf06af14ed Update webstats_log.lua 2026-07-05 13:24:37 +08:00
Mr Chen
805c96f260 Merge pull request #920 from midoks/dev
常规更新
2026-07-05 12:33:28 +08:00
8ccba2f6d5 Update webstats_log.lua 2026-07-05 04:08:00 +08:00
2e9f01d3ee Update webstats_log.lua 2026-07-05 04:05:19 +08:00
d1dcdd4f25 Update webstats_common.lua 2026-07-05 03:58:34 +08:00
60958d1403 Update webstats_common.lua 2026-07-05 03:56:13 +08:00
5530b14f36 Update webstats_common.lua 2026-07-05 03:36:39 +08:00
64c9942ee1 Update webstats_common.lua 2026-07-05 03:36:26 +08:00
bc1437dac4 Update webstats_init_worker.lua 2026-07-05 03:27:35 +08:00
1d9576e838 Update webstats_log.lua 2026-07-05 03:27:11 +08:00
8b275a5df4 Update webstats_log.lua 2026-07-05 03:18:14 +08:00
40d9334dcf Update index.py 2026-07-05 02:45:28 +08:00
98c0242819 Update index.py 2026-07-05 02:39:23 +08:00
a2fb03f9b8 Update index.py 2026-07-05 02:31:20 +08:00
98815ac5c3 update 2026-07-05 02:29:29 +08:00
073dd20c96 update 2026-07-05 01:16:02 +08:00
23af9085a9 update 2026-07-05 00:51:14 +08:00
bcaec6b6ee Update install.sh 2026-07-04 23:42:10 +08:00
4063bea922 Update webstats_common.lua 2026-07-04 23:02:54 +08:00
9f864b3407 Update webstats_common.lua 2026-07-04 22:56:49 +08:00
01ac598e39 Update webstats_common.lua 2026-07-04 22:43:20 +08:00
77a0d3af36 Update webstats_common.lua 2026-07-04 22:35:03 +08:00
8d34bbea47 Update webstats_common.lua 2026-07-04 22:33:43 +08:00
be18e98001 Update webstats_common.lua 2026-07-04 22:23:56 +08:00
754e0f98f9 Update webstats_common.lua 2026-07-04 22:23:43 +08:00
07f893b6a1 Update webstats_common.lua 2026-07-04 22:21:17 +08:00
Mr Chen
c1497ec44e Merge pull request #919 from midoks/dev
常规更新
2026-07-03 12:05:30 +08:00
55d4784fe2 Update webstats_common.lua 2026-07-02 14:30:04 +08:00
f26e8bc520 update 2026-07-02 14:22:10 +08:00
7b5f1a4253 up 2026-07-02 14:12:32 +08:00
1058fb7e1f Update webstats_log.lua 2026-07-02 14:01:50 +08:00
0f1b95cdfc up 2026-07-02 13:54:31 +08:00
8ea16fcd85 Update webstats_common.lua 2026-07-02 13:32:22 +08:00
b4b9496980 Update webstats_common.lua 2026-07-02 13:15:12 +08:00
8dfd26361f Update webstats_common.lua 2026-07-02 13:06:32 +08:00
cb5bd32b86 Update webstats_common.lua 2026-07-02 13:02:31 +08:00
2584330d40 update 2026-07-02 12:52:05 +08:00
ebe6333ac9 up 2026-07-02 12:50:35 +08:00
534892280e up 2026-07-02 12:45:28 +08:00
df05cf69cf Update tool_migrate.py 2026-07-02 12:27:43 +08:00
2f782cf6a2 Update db.py 2026-07-02 12:26:19 +08:00
6f483c17e6 Create tool_migrate_bak.py 2026-07-02 11:42:13 +08:00
e64610a2dc Update mw.py 2026-06-30 20:18:46 +08:00
Mr Chen
7673a16779 Merge pull request #918 from midoks/dev
常规更新
2026-06-29 00:51:56 +08:00
d73fe4b29c Update __init__.py 2026-06-29 00:51:14 +08:00
2c61be084b Update __init__.py 2026-06-29 00:38:56 +08:00
fe5f8d1997 Update __init__.py 2026-06-29 00:38:08 +08:00
2653291ded Update __init__.py 2026-06-29 00:37:42 +08:00
417f91a2e8 Update init_cron.py 2026-06-29 00:19:10 +08:00
Mr Chen
08625e85bb Merge pull request #917 from midoks/dev
常规更新
2026-06-28 23:23:15 +08:00
c554c19a12 Update site.py 2026-06-28 23:10:34 +08:00
d7d08f2f12 Update site.py 2026-06-28 23:09:46 +08:00
Mr Chen
bafe45a2f9 Merge pull request #916 from midoks/dev
常规优化
2026-06-28 22:44:26 +08:00
a11d24723d Update README.md 2026-06-28 22:43:37 +08:00
3b858476f1 Update version.py 2026-06-28 22:41:13 +08:00
5560b68ac1 Update site.js 2026-06-28 22:40:26 +08:00
8bfd381363 Update site.py 2026-06-28 22:38:29 +08:00
c6cfe2a22c Update mw.py 2026-06-28 22:34:51 +08:00
4ed274dedc Update gd_old.sh 2026-06-28 22:26:28 +08:00
Mr Chen
283c815de7 Merge pull request #915 from midoks/dev
哪吒监控更新,同步官方
2026-06-22 18:00:56 +08:00
c72c1bc889 Update update.sh 2026-06-22 17:59:31 +08:00
6e61a535ca Update update.sh 2026-06-22 17:54:37 +08:00
c1f69ea1c7 Update update.sh 2026-06-22 17:51:11 +08:00
984599c56f Update update.sh 2026-06-22 17:50:22 +08:00
038bb31ec3 Update update.sh 2026-06-22 17:48:58 +08:00
1ac541d16e Update update.sh 2026-06-22 17:48:47 +08:00
ecaa0e99c5 Update update.sh 2026-06-22 17:45:38 +08:00
666ebeef0d Update update.sh 2026-06-22 17:43:53 +08:00
b39a936fa4 Update update.sh 2026-06-22 17:41:12 +08:00
d434dce568 Update update.sh 2026-06-22 17:40:21 +08:00
6acb390133 Update update.sh 2026-06-22 17:30:59 +08:00
3c6f3c50c4 Update update.sh 2026-06-22 17:28:40 +08:00
c52e707421 Update update.sh 2026-06-22 17:21:11 +08:00
5fb998c221 update 2026-06-22 17:15:18 +08:00
a0989ea833 Update nezha.js 2026-06-22 17:12:09 +08:00
5e565c06a0 Update nezha.js 2026-06-22 17:09:22 +08:00
69b96aa5fa Create update.sh 2026-06-22 17:08:16 +08:00
bce9de1494 Update nezha.js 2026-06-22 17:05:57 +08:00
3de7928be7 Update nezha.js 2026-06-22 17:05:30 +08:00
41630ef01a Update install.sh 2026-06-22 17:03:46 +08:00
bf29cb1a4d Update index.py 2026-06-22 16:59:49 +08:00
8f79a4ab86 update 2026-06-22 16:59:23 +08:00
0ad933c5ad Update nezha.js 2026-06-22 16:55:33 +08:00
5ed9470d83 update 2026-06-22 16:53:26 +08:00
cac468f454 Update plugin.py 2026-06-22 16:33:54 +08:00
f0f9dcf4de Update index.py 2026-06-22 16:32:59 +08:00
3e0e84a4f6 Update index.py 2026-06-22 16:09:53 +08:00
ef8080b420 Update index.py 2026-06-22 16:05:57 +08:00
b5fab1fb10 Update plugin.py 2026-06-22 16:03:41 +08:00
c3f019d4ff Update plugin.py 2026-06-22 16:00:40 +08:00
701f172276 Update plugin.py 2026-06-22 15:56:05 +08:00
9e8c736cb4 Update install.sh 2026-06-22 15:31:31 +08:00
c8589d750c Update info.json 2026-06-22 15:30:42 +08:00
5bb20a01de update 2026-06-22 15:16:01 +08:00
6e4bf9da3e Update nezha.js 2026-06-22 15:02:39 +08:00
c21ddb5c63 Update install.sh 2026-06-22 14:43:12 +08:00
431295cec9 update 2026-06-22 14:42:54 +08:00
180cb84b2c Update index.py 2026-06-22 14:42:14 +08:00
66b5f322d9 Update index.py 2026-06-22 14:41:00 +08:00
f00dc248bd Update install.sh 2026-06-22 14:40:16 +08:00
dbba5db9f7 Update info.json 2026-06-22 14:40:06 +08:00
3a8b799df6 Update index.py 2026-06-22 14:39:29 +08:00
0b99a4ae74 update 2026-06-22 14:35:51 +08:00
99b77d347a update 2026-06-22 14:30:08 +08:00
8235a88ecc Update nezha.js 2026-06-22 14:27:32 +08:00
564ba30f91 Update install.sh 2026-06-22 14:23:48 +08:00
aa8535d513 update 2026-06-22 14:22:40 +08:00
a02ef2575b Update install.sh 2026-06-22 14:21:10 +08:00
a0be16c0fa Update install.sh 2026-06-22 14:12:24 +08:00
548d87e339 Update install.sh 2026-06-22 14:12:14 +08:00
c704aa0817 Update install.sh 2026-06-22 14:10:03 +08:00
c6a060fde5 Update install.sh 2026-06-22 14:09:51 +08:00
762e88cc44 Update index.py 2026-06-22 14:05:03 +08:00
b7f671d1d5 update 2026-06-22 14:04:45 +08:00
48706d01f9 Update index.py 2026-06-22 14:04:21 +08:00
fb53354956 Update index.py 2026-06-22 14:03:54 +08:00
5995147054 Update index.py 2026-06-22 13:59:22 +08:00
fed9f458d1 Update install.sh 2026-06-22 13:49:41 +08:00
7987564401 Update install.sh 2026-06-22 13:45:08 +08:00
90ae21fb8b Update nezha.service.tpl 2026-06-22 13:43:14 +08:00
56a78d174d Update install.sh 2026-06-22 13:31:25 +08:00
37da947b90 Update install.sh 2026-06-22 13:31:09 +08:00
f23e272027 Update install.sh 2026-06-22 13:27:25 +08:00
10afc0a2d5 Update install.sh 2026-06-22 13:19:13 +08:00
f59c8ea533 Update install.sh 2026-06-22 13:17:26 +08:00
4153ea7431 update 2026-06-22 13:16:32 +08:00
2c73577798 Update nezha.js 2026-06-22 13:08:33 +08:00
0b5c53ef7e Update index.html 2026-06-22 12:55:34 +08:00
0fca0d54f8 Update info.json 2026-06-22 12:53:08 +08:00
3da0c5b2b6 Update install.sh 2026-06-22 12:52:55 +08:00
d8519bc1c3 update 2026-06-22 12:49:08 +08:00
33a4a799c5 Update index.py 2026-06-22 12:48:46 +08:00
358a021ba6 Update install.sh 2026-06-22 12:47:54 +08:00
6dba9c25b6 update 2026-06-22 12:47:23 +08:00
Mr Chen
1f724c802b Merge pull request #914 from midoks/dependabot/pip/gevent-23.9.0
Bump gevent from 22.10.2 to 23.9.0
2026-06-21 10:36:12 +08:00
dependabot[bot]
67e3dd0035 Bump gevent from 22.10.2 to 23.9.0
Bumps [gevent](https://github.com/gevent/gevent) from 22.10.2 to 23.9.0.
- [Release notes](https://github.com/gevent/gevent/releases)
- [Changelog](https://github.com/gevent/gevent/blob/master/docs/changelog_pre.rst)
- [Commits](https://github.com/gevent/gevent/compare/22.10.2...23.9.0)

---
updated-dependencies:
- dependency-name: gevent
  dependency-version: 23.9.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-21 02:35:26 +00:00
Mr Chen
de657829fd Merge pull request #913 from midoks/dev
常规更新
2026-06-21 10:33:03 +08:00
a2c27134a8 update 2026-06-21 10:30:30 +08:00
66c60ec10e Update r3.9.txt 2026-06-21 10:25:42 +08:00
867b39d8e1 Update r3.9.txt 2026-06-21 10:25:12 +08:00
1c8997d44a Update requirements.txt 2026-06-21 10:23:14 +08:00
88b5112e30 Update requirements.txt 2026-06-21 10:20:39 +08:00
3874b6a25a Update mw.py 2026-06-21 10:18:48 +08:00
Mr Chen
8ba6587c57 Merge pull request #912 from midoks/dev
常规更新
2026-06-21 10:17:02 +08:00
3ebe36f785 Update mw.py 2026-06-21 10:13:07 +08:00
Mr Chen
34ed0b96d3 Merge pull request #910 from midoks/dev
常规更新
2026-06-20 19:38:45 +08:00
ab353d2268 Update mw.py 2026-06-20 19:36:23 +08:00
Mr Chen
fd6f013480 Merge pull request #909 from midoks/dev
证书读取兼容
2026-06-20 19:31:31 +08:00
4d0b7bc127 Update mw.py 2026-06-20 19:27:39 +08:00
ce917b227f Merge branch 'master' into dev 2026-06-20 18:58:41 +08:00
dec1bb04e8 Merge branch 'master' into dev 2026-06-20 18:57:49 +08:00
Mr Chen
a1093c17bc Merge pull request #908 from midoks/dev
常规更新
2026-06-20 18:56:05 +08:00
8110fbf701 Update openresty.js 2026-06-20 18:44:03 +08:00
cf502ebf05 Update openresty.js 2026-06-20 18:37:41 +08:00
7c7837b967 up 2026-06-20 18:25:40 +08:00
3bfc1cacb0 Update openresty.js 2026-06-20 18:20:52 +08:00
cd2ea26608 Update openresty.js 2026-06-20 18:15:52 +08:00
dcf8159d1c update 2026-06-20 18:11:57 +08:00
Mr Chen
1bdab80b5d Merge pull request #907 from midoks/dev
常规更新
2026-06-20 15:33:43 +08:00
241c4dc600 Update install.sh 2026-06-20 15:24:32 +08:00
18e93d2b24 Update info.json 2026-06-20 15:13:08 +08:00
084cf6b761 Update info.json 2026-06-20 14:42:54 +08:00
47ddf5f4e6 Update install.sh 2026-06-20 14:40:58 +08:00
325321f5d4 Update install.sh 2026-06-20 14:32:38 +08:00
ecbeca3d35 Update install.sh 2026-06-20 14:29:40 +08:00
862b434c72 Update install.sh 2026-06-20 14:29:10 +08:00
6376ed3b7b update 2026-06-20 14:28:23 +08:00
42e40d1718 Update push_notice_msg.py 2026-06-18 14:33:55 +08:00
1c1cc12058 Update install.sh 2026-06-18 02:23:01 +08:00
e648b88a74 Update install.sh 2026-06-18 02:05:24 +08:00
Mr Chen
6fea46f7c8 Merge pull request #905 from midoks/dev
常规更新
2026-06-17 18:21:27 +08:00
a06e5a6e55 Update gd_old.sh 2026-06-17 18:21:15 +08:00
85bf429a08 Update freetype_old.sh 2026-06-17 18:14:30 +08:00
dd6ba45cdd Update gd_old.sh 2026-06-17 17:39:36 +08:00
ab967efa64 Update gd_old.sh 2026-06-17 17:16:14 +08:00
369505e1a0 Update r3.9.txt 2026-06-12 18:18:08 +08:00
86d858a0fb Update r3.9.txt 2026-06-12 18:15:50 +08:00
d1f5158276 Update r3.9.txt 2026-06-12 18:13:48 +08:00
Mr Chen
db83b0f78c Merge pull request #904 from midoks/dev
常规更新
2026-06-12 18:07:52 +08:00
24fcc5a0c6 Update requirements.txt 2026-06-12 17:51:47 +08:00
Mr Chen
9cb3d474aa Merge pull request #900 from midoks/dev
常规更新
2026-06-12 16:29:24 +08:00
0adfebfad6 Update install.sh 2026-06-12 16:25:58 +08:00
66c4225aa3 update 2026-06-09 11:11:15 +08:00
6ddef9ffda Update setting.py 2026-06-08 17:56:08 +08:00
27a1b22e6f Update setting.py 2026-06-08 17:54:45 +08:00
f9c18cb225 update 2026-06-07 00:10:11 +08:00
b97733328a Update plugin.py 2026-06-05 11:47:25 +08:00
Mr Chen
2fe17aefd9 Merge pull request #899 from midoks/dev
常规更新
2026-06-01 19:10:03 +08:00
acddca54cd update 2026-06-01 19:06:13 +08:00
7d80fb31ce Update install.sh 2026-06-01 18:52:36 +08:00
Mr Chen
8ac1d78053 Merge pull request #898 from midoks/dev
常规优化
2026-06-01 11:53:03 +08:00
468d6d7752 Update op_waf_index.py 2026-06-01 11:50:38 +08:00
f49d789411 update 2026-06-01 11:49:51 +08:00
1f56115fbb update 2026-05-21 17:35:19 +08:00
20d277102e Update install.sh 2026-05-21 11:08:06 +08:00
47b4036f09 Update install.sh 2026-05-21 10:32:07 +08:00
Mr Chen
ee9e154fec Merge pull request #897 from midoks/dev
openresty 1.29.2.4
2026-05-21 10:26:24 +08:00
85256b4fb6 Update install.sh 2026-05-21 10:24:37 +08:00
Mr Chen
16be671f1d Merge pull request #896 from midoks/dev
常规更新
2026-05-20 16:08:41 +08:00
af880115ab update 2026-05-17 18:06:54 +08:00
e64ac8f616 Update info.json 2026-05-17 18:01:47 +08:00
a7d4206b77 update 2026-05-17 17:58:29 +08:00
5a80690404 update 2026-05-17 17:55:47 +08:00
9b0d71d4ac Update phplib.conf 2026-05-17 17:54:01 +08:00
729f77d8db Update opcache.sh 2026-05-17 17:53:53 +08:00
e89f96aa2d Update phplib.conf 2026-05-17 17:50:16 +08:00
Mr Chen
f05f81cace Merge pull request #893 from midoks/dev
常规优化
2026-05-09 20:20:59 +08:00
f4883ee708 Update webstats_index.py 2026-05-09 20:18:45 +08:00
043fb739d9 Update index.py 2026-05-09 20:04:41 +08:00
b19aa8702b Update index.py 2026-05-09 20:01:39 +08:00
f4e0744879 update 2026-05-09 19:59:09 +08:00
Mr Chen
d7c822f86d Merge pull request #892 from midoks/dev
常规更新
2026-05-09 14:31:10 +08:00
c8f8e217e5 update 2026-05-09 14:26:41 +08:00
Mr Chen
bfec7f1fe8 Merge pull request #891 from midoks/dev
常规更新
2026-05-07 19:07:02 +08:00
21fce1f618 Update index.py 2026-05-07 19:05:07 +08:00
b5987b57ad Update task.py 2026-05-07 18:48:04 +08:00
e8c1cb08a7 update 2026-05-07 18:47:45 +08:00
0de3a16898 Update index.py 2026-05-07 18:42:07 +08:00
278bd7f38e Update debian.sh 2026-05-07 17:50:16 +08:00
4a3b9db324 Update debian.sh 2026-05-07 17:47:48 +08:00
b3e8e96875 Update index.py 2026-05-07 17:06:56 +08:00
f5e50c6d76 Update index.py 2026-05-07 16:59:27 +08:00
c551c2ee1a Update index.py 2026-05-07 16:55:58 +08:00
3fb8406e7b Update index.py 2026-05-07 16:53:30 +08:00
50d12407c9 Update install.sh 2026-05-07 16:48:13 +08:00
17931bb0ea Update install.sh 2026-05-07 16:48:03 +08:00
6d30940920 Update index.py 2026-05-07 16:46:31 +08:00
3a4c985baf Update index.py 2026-05-07 16:45:59 +08:00
Mr Chen
960d8b6cb8 Merge pull request #890 from midoks/dev
mongodb 兼容低版本
2026-05-07 16:34:36 +08:00
9b7e9d4ffa update 2026-05-07 16:29:03 +08:00
c1a646c0d7 Merge branch 'master' into dev 2026-05-07 16:25:26 +08:00
48ef0e7a65 Update index.py 2026-05-07 16:22:03 +08:00
8dff306a91 Update index.py 2026-05-07 16:20:03 +08:00
a935acbc95 update 2026-05-07 16:12:16 +08:00
b1f9c99eb1 Update mw.tpl 2026-05-07 16:04:53 +08:00
0851f749c3 Update mw.tpl 2026-05-07 15:57:20 +08:00
3a7d9f84c7 Update install.sh 2026-05-07 15:22:12 +08:00
b43b35ccab Update install.sh 2026-05-07 15:21:29 +08:00
5fc6eacc53 update 2026-05-07 15:11:09 +08:00
bd782362e8 update 2026-05-07 15:06:37 +08:00
32151a176f update 2026-05-07 15:04:27 +08:00
f7c88d2086 update 2026-05-07 14:01:26 +08:00
1eb76f2b90 update 2026-05-07 13:56:40 +08:00
226b3e049d Merge branch 'master' into dev 2026-05-07 12:58:58 +08:00
Mr Chen
7f0e9851cd Merge pull request #889 from midoks/dev
常规优化
2026-05-07 12:58:41 +08:00
15df77940e Update index.py 2026-05-07 12:09:57 +08:00
9781516552 Update plugin.py 2026-05-07 12:05:18 +08:00
a23264a542 update 2026-05-07 12:03:23 +08:00
0e7845985a Update install.sh 2026-05-07 11:51:06 +08:00
93efe45347 Update install.sh 2026-05-07 11:40:52 +08:00
a46f824e1e Update install.sh 2026-05-07 11:40:09 +08:00
Mr Chen
0de9f036bc Merge pull request #888 from midoks/dev
常规优化
2026-05-01 19:19:07 +08:00
275f2515d6 优化 2026-05-01 19:17:05 +08:00
b4604928ec Update panel_task.py 2026-05-01 18:53:42 +08:00
5a79b4021a update 2026-04-23 23:09:01 +08:00
280fd38039 Create r3.9.txt 2026-04-23 15:29:05 +08:00
Mr Chen
b032364616 Merge pull request #887 from midoks/dev
常规更新
2026-04-23 00:24:22 +08:00
a430aaee97 Update index.py 2026-04-23 00:19:46 +08:00
f4ee2ca3b9 Update install.sh 2026-04-23 00:12:59 +08:00
92b9212b31 update 2026-04-23 00:12:57 +08:00
73656e60ff Update nginx.conf 2026-04-22 23:02:44 +08:00
401329d80c update 2026-04-22 22:32:25 +08:00
Mr Chen
6131970724 Merge pull request #886 from midoks/dev
常规优化
2026-04-21 20:51:12 +08:00
85dcc4b78a update 2026-04-21 20:27:46 +08:00
34a1bf7e28 Update mw.tpl 2026-04-15 20:33:51 +08:00
709 changed files with 38110 additions and 6786 deletions

1
.gitignore vendored
View File

@@ -196,3 +196,4 @@ plugins/goedge-happy
/plugins/choose-linux-python
*.md5
/bak
*.tmp

View File

@@ -108,11 +108,11 @@ docker run -itd --name mw-server --privileged=true -p 7200:7200 -p 80:80 -p 443:
```
### 版本更新 0.18.5
### 版本更新 0.19.0
- 常规优化。
### JSDelivr安装地址
### 增加在线更新支持。
- 初始安装

4
cli.sh
View File

@@ -19,12 +19,12 @@ fi
mw_start_task()
{
isStart=$(ps aux |grep 'panel_task.py'|grep -v grep|awk '{print $2}')
if [ "$isStart" == '' ];then
if [ "$isStart" = '' ];then
echo -e "starting mw-tasks... \c"
cd $DIR && python3 panel_task.py >> ${DIR}/logs/panel_task.log 2>&1 &
sleep 0.3
isStart=$(ps aux |grep 'panel_task.py'|grep -v grep|awk '{print $2}')
if [ "$isStart" == '' ];then
if [ "$isStart" = '' ];then
echo -e "\033[31mfailed\033[0m"
echo '------------------------------------------------------'
tail -n 20 $DIR/logs/panel_task.log

View File

@@ -80,6 +80,7 @@ def runPanelTask():
# 站点过期检查
siteEdateCheck()
# echo "True" > /www/server/mdserver-web/logs/panel_task.lock
lock_file = mw.getTriggerTaskLockFile()
try:
if os.path.exists(lock_file):
@@ -183,7 +184,7 @@ def check502():
verlist = [
'52', '53', '54', '55', '56', '70',
'71', '72', '73', '74', '80', '81',
'82', '83', '84'
'82', '83', '84', '85'
]
for ver in verlist:
server_dir = mw.getServerDir()

View File

@@ -223,14 +223,14 @@ def mwcli(mw_input=0):
else:
mw.echoInfo("二次验证已关闭!")
elif mw_input == 27:
cmd = 'which ufw'
cmd = 'command -v ufw'
run_cmd = False
find_cmd = mw.execShell(cmd)
if find_cmd[0].strip() != '':
run_cmd = True
os.system('ufw status')
cmd = 'which firewall-cmd'
cmd = 'command -v firewall-cmd'
find_cmd = mw.execShell(cmd)
if find_cmd[0].strip() != '':
run_cmd = True

View File

@@ -606,7 +606,7 @@ def runHookDstDomain(row):
if mw.isAppleSystem():
user = getRunUser()
cmd += "source /Users/"+user+"/.zshrc\n"
cmd += ". /Users/"+user+"/.zshrc\n"
cmd_data = getDnsapiData(row['dnsapi_id'])
# print(cmd_data)

View File

@@ -13,7 +13,7 @@ VERSION=$2
# acme.sh --uninstall
# source /Users/xxx/.zshrc
# . /Users/xxx/.zshrc
# https://github.com/acmesh-official/acme.sh/wiki/dnsapi
# https://docs.dnspod.com/api-legacy/domains.html#get-the-domain-list
@@ -24,7 +24,7 @@ VERSION=$2
if [ -f ${rootPath}/bin/activate ];then
source ${rootPath}/bin/activate
. ${rootPath}/bin/activate
fi
# pip install cloudflare
@@ -47,7 +47,7 @@ Uninstall_App()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_App
else
Uninstall_App

View File

@@ -122,7 +122,7 @@ def openPort():
return True
def status():
cmd = "ps aux|grep alist |grep -v grep | grep -v python | grep -v mdserver-web | awk '{print $2}'"
cmd = "ps -ef|grep alist |grep -v grep | grep -v python | grep -v mdserver-web | awk '{print $2}'"
data = mw.execShell(cmd)
if data[0] == '':
return 'stop'

View File

@@ -16,16 +16,16 @@ sysArch=`arch`
sysName=`uname`
ALIST_ARCH_NAME=amd64
if [ "$sysArch" == "arm64" ];then
if [ "$sysArch" = "arm64" ];then
ALIST_ARCH_NAME=arm64
elif [ "$sysArch" == "x86_64" ]; then
elif [ "$sysArch" = "x86_64" ]; then
ALIST_ARCH_NAME=amd64
elif [ "$sysArch" == "aarch64" ]; then
elif [ "$sysArch" = "aarch64" ]; then
ALIST_ARCH_NAME=arm64
fi
ALIST_NAME=linux
if [ "$sysName" == "Darwin" ];then
if [ "$sysName" = "Darwin" ];then
ALIST_NAME=darwin
fi
@@ -86,7 +86,7 @@ Uninstall_App()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_App
else
Uninstall_App

View File

@@ -27,7 +27,7 @@ else
fi
NGINX_IDS=`ps -ef|grep nginx | grep -v grep| awk '{print $2}'`
if [ "$NGINX_IDS" == "" ];then
if [ "$NGINX_IDS" = "" ];then
ps -ef|grep nginx| grep -v grep| awk '{print $2}' | xargs kill -9
systemctl start "$service_name"
echo "OpenResty未运行,正在启动服务..."

View File

@@ -174,7 +174,7 @@ def initDreplace():
def status():
cmd = "ps -ef|grep 'httpd/bin/httpd' |grep -v grep | grep -v python | awk '{print $2}'"
cmd = "ps -ef|grep 'httpd' |grep -v grep | grep -v python | awk '{print $2}'"
data = mw.execShell(cmd)
if data[0] == '':
return 'stop'

View File

@@ -38,7 +38,7 @@ else
useradd -g www -s /bin/bash www
fi
if [ "${action}" == "upgrade" ];then
if [ "${action}" = "upgrade" ];then
sh -x $curPath/versions/$2/install.sh $1
echo "${VERSION}" > $serverPath/apache/version.pl
@@ -53,12 +53,12 @@ if [ "${action}" == "upgrade" ];then
fi
if [ "${2}" == "" ];then
if [ "${2}" = "" ];then
echo '缺少安装脚本版本...'
exit 0
fi
if [ "${action}" == "uninstall" ];then
if [ "${action}" = "uninstall" ];then
if [ -f /usr/lib/systemd/system/httpd.service ] || [ -f /lib/systemd/system/httpd.service ];then
systemctl stop httpd
rm -rf /usr/systemd/system/httpd.service
@@ -75,7 +75,7 @@ fi
sh -x $curPath/versions/$2/install.sh $1
if [ "${action}" == "install" ] && [ -d $serverPath/apache ];then
if [ "${action}" = "install" ] && [ -d $serverPath/apache ];then
echo "${VERSION}" > $serverPath/apache/version.pl
mkdir -p $serverPath/web_conf/php/conf

View File

@@ -14,12 +14,12 @@ sysName=`uname`
action=$1
type=$2
VERSION=2.4.66
VERSION=2.4.68
apacheDir=${serverPath}/source/apache
Install_App()
{
if [ "${action}" == "install" ];then
if [ "${action}" = "install" ];then
if [ -d $serverPath/apache ];then
exit 0
fi
@@ -71,7 +71,7 @@ Install_App()
cd ${apacheDir} && tar -jxf apr-${APR_VERSION}.tar.bz2
cd ${apacheDir}/apr-${APR_VERSION} && ./configure --prefix=${serverPath}/apache/apr
make -j${cpuCore} && make install
if [ "$?" == "0" ];then
if [ "$?" = "0" ];then
# 检查 APR 配置文件
APR_CONFIG=$(find ${serverPath}/apache/apr -name "apr-*config" | head -1)
if [ -z "$APR_CONFIG" ];then
@@ -90,7 +90,7 @@ Install_App()
cd ${apacheDir} && tar -jxf apr-util-${APR_UTIL_VERSION}.tar.bz2
cd ${apacheDir}/apr-util-${APR_UTIL_VERSION} && ./configure --prefix=${serverPath}/apache/apr-util --with-apr=${serverPath}/apache/apr
make -j${cpuCore} && make install
if [ "$?" == "0" ];then
if [ "$?" = "0" ];then
# 检查 APR-util 配置文件
APU_CONFIG=$(find ${serverPath}/apache/apr-util -name "apu-*config" | head -1)
if [ -z "$APU_CONFIG" ];then
@@ -163,9 +163,9 @@ Uninstall_App()
}
action=$1
if [ "${1}" == "install" ];then
if [ "${1}" = "install" ];then
Install_App
elif [ "${1}" == "upgrade" ];then
elif [ "${1}" = "upgrade" ];then
Install_App
else
Uninstall_App

View File

@@ -24,7 +24,7 @@ Uninstall_App()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_App $2
else
Uninstall_App $2

View File

@@ -27,7 +27,7 @@ else
fi
NGINX_IDS=`ps -ef|grep caddy | grep -v grep| awk '{print $2}'`
if [ "$NGINX_IDS" == "" ];then
if [ "$NGINX_IDS" = "" ];then
ps -ef|grep caddy| grep -v grep| awk '{print $2}' | xargs kill -9
systemctl start "$service_name"
echo "caddy未运行,正在启动服务..."

View File

@@ -109,7 +109,7 @@ def initDreplace():
caddy_file = getConf()
if not os.path.exists(caddy_file):
caddy_file_tpl = getConfTpl()
content = mw.readFile(systemServiceTpl)
content = mw.readFile(caddy_file_tpl)
content = content.replace('{$SERVER_PATH}', service_path)
mw.writeFile(caddy_file, content)

View File

@@ -20,9 +20,9 @@ After=network.target network-online.target
Requires=network-online.target
[Service]
Type=notify
User=caddy
Group=caddy
Type=simple
User=www
Group=www
ExecStart={$SERVER_PATH}/caddy/bin/caddy run --environ --config {$SERVER_PATH}/caddy/Caddyfile
ExecReload={$SERVER_PATH}/caddy/bin/caddy reload --config {$SERVER_PATH}/caddy/Caddyfile --force
TimeoutStopSec=5s

View File

@@ -3,7 +3,7 @@ PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/hom
export PATH
# cd /Users/midoks/Desktop/mwdev/server/mdserver-web/plugins/caddy && bash install.sh install 1.21.4
# cd /www/server/mdserver-web/plugins/caddy && bash install.sh install 1.21.4
# cd /www/server/mdserver-web/plugins/caddy && bash install.sh install 2.11
# cd /www/server/mdserver-web/plugins/caddy && bash install.sh install 1.29.2
# cd /www/server/mdserver-web/plugins/caddy && bash install.sh upgrade 1.29.2
@@ -33,7 +33,7 @@ else
useradd -g www -s /bin/bash www
fi
if [ "${action}" == "upgrade" ];then
if [ "${action}" = "upgrade" ];then
sh -x $curPath/versions/$2/install.sh $1
echo "${VERSION}" > $serverPath/caddy/version.pl
@@ -45,12 +45,12 @@ if [ "${action}" == "upgrade" ];then
fi
if [ "${2}" == "" ];then
if [ "${2}" = "" ];then
echo '缺少安装脚本版本...'
exit 0
fi
if [ "${action}" == "uninstall" ];then
if [ "${action}" = "uninstall" ];then
if [ -f /usr/lib/systemd/system/caddy.service ] || [ -f /lib/systemd/system/caddy.service ];then
systemctl stop caddy
rm -rf /usr/systemd/system/caddy.service
@@ -67,7 +67,7 @@ fi
sh -x $curPath/versions/$2/install.sh $1
if [ "${action}" == "install" ] && [ -d $serverPath/caddy ];then
if [ "${action}" = "install" ] && [ -d $serverPath/caddy ];then
echo "${VERSION}" > $serverPath/caddy/version.pl
#初始化

View File

@@ -30,6 +30,7 @@ case $(uname -m) in
x86_64) ARCH_NAME="amd64" ;;
arm) ARCH_NAME="arm64" ;;
arm64) ARCH_NAME="arm64" ;;
aarch64) ARCH_NAME="arm64" ;;
esac
VERSION=2.11.2
@@ -38,7 +39,7 @@ caddyDir=${serverPath}/source/caddy
Install_App()
{
if [ "${action}" == "install" ];then
if [ "${action}" = "install" ];then
if [ -d $serverPath/caddy ];then
exit 0
fi
@@ -59,7 +60,7 @@ Install_App()
mkdir -p cd $serverPath/source/caddy/caddy
cd $serverPath/source/caddy/caddy && tar -zxvf ${caddyDir}/$FILE_NAME
if [ "$OSNAME" == "mac" ];then
if [ "$OSNAME" = "mac" ];then
xattr -cr caddy
fi
@@ -78,9 +79,9 @@ Uninstall_App()
}
action=$1
if [ "${1}" == "install" ];then
if [ "${1}" = "install" ];then
Install_App
elif [ "${1}" == "upgrade" ];then
elif [ "${1}" = "upgrade" ];then
Install_App
else
Uninstall_App

View File

@@ -142,6 +142,7 @@ def initConf():
"/www/server/rsyncd",
"/www/server/acme_pandominassl_apply",
"/www/server/sphinx/index",
"/www/server/manticoresearch",
"/www/server/mongodb/logs",
"/www/server/php/53/var/log",
"/www/server/php/54/var/log",
@@ -165,6 +166,7 @@ def initConf():
"/www/server/alist/data/log",
"/www/server/dztasks/logs",
"/www/server/rsyncd/lsyncd.log",
"/www/server/mdserver-web/logs",
]
for i in clogcom:
if os.path.exists(i):

View File

@@ -13,7 +13,7 @@ serverPath=$(dirname "$rootPath")
VERSION=$2
if [ -f ${rootPath}/bin/activate ];then
source ${rootPath}/bin/activate
. ${rootPath}/bin/activate
fi
@@ -35,7 +35,7 @@ Uninstall_app()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_app
else
Uninstall_app

View File

@@ -99,7 +99,7 @@ def readConfigTpl():
def status():
data = mw.execShell(
"ps aux|grep cloudreve |grep -v grep | grep -v python | grep -v mdserver-web | awk '{print $2}'")
"ps -ef|grep cloudreve |grep -v grep | grep -v python | grep -v mdserver-web | awk '{print $2}'")
if data[0] == '':
return 'stop'

View File

@@ -16,16 +16,16 @@ sysArch=`arch`
sysName=`uname`
ALIST_ARCH_NAME=amd64
if [ "$sysArch" == "arm64" ];then
if [ "$sysArch" = "arm64" ];then
ALIST_ARCH_NAME=arm64
elif [ "$sysArch" == "x86_64" ]; then
elif [ "$sysArch" = "x86_64" ]; then
ALIST_ARCH_NAME=amd64
elif [ "$sysArch" == "aarch64" ]; then
elif [ "$sysArch" = "aarch64" ]; then
ALIST_ARCH_NAME=aarch64
fi
ALIST_NAME=linux
if [ "$sysName" == "Darwin" ];then
if [ "$sysName" = "Darwin" ];then
ALIST_NAME=darwin
fi
@@ -83,7 +83,7 @@ Uninstall_App()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_App
else
Uninstall_App

View File

@@ -15,7 +15,7 @@ from pprint import pprint
sys.path.append(os.getcwd() + "/class/core")
import mw
# cd /www/server/mdserver-web && source bin/activate
# cd /www/server/mdserver-web && . bin/activate
# python3 plugins/cryptocurrency_trade/ccxt/public_data/data.py run
# python3 plugins/cryptocurrency_trade/ccxt/public_data/data.py long

View File

@@ -6,7 +6,7 @@ curPath=`pwd`
# bash plugins/cryptocurrency_trade/ccxt/public_data/data.sh
if [ -f ${curPath}/bin/activate ];then
source ${curPath}/bin/activate
. ${curPath}/bin/activate
fi
python3 plugins/cryptocurrency_trade/ccxt/public_data/data.py long

View File

@@ -11,7 +11,7 @@ from decimal import Decimal
sys.path.append(os.getcwd() + "/plugins/cryptocurrency_trade/strategy")
import common
# cd /www/server/mdserver-web && source bin/activate
# cd /www/server/mdserver-web && . bin/activate
# python3 plugins/cryptocurrency_trade/ccxt/strategy/func_test.py run
# common.notifyMsg("任务开始")

View File

@@ -1,4 +1,4 @@
# cd /www/server/mdserver-web && source bin/activate
# cd /www/server/mdserver-web && . bin/activate
# python3 plugins/cryptocurrency_trade/ccxt/strategy/gate_100.py run
# python3 plugins/cryptocurrency_trade/ccxt/strategy/gate_100.py long

View File

@@ -11,7 +11,7 @@ from pprint import pprint
sys.path.append(os.getcwd() + "/plugins/cryptocurrency_trade/strategy")
import common
# cd /www/server/mdserver-web && source bin/activate
# cd /www/server/mdserver-web && . bin/activate
# python3 plugins/cryptocurrency_trade/ccxt/strategy/hammer_robot.py run

View File

@@ -1,4 +1,4 @@
# cd /www/server/mdserver-web && source bin/activate
# cd /www/server/mdserver-web && . bin/activate
# python3 plugins/cryptocurrency_trade/ccxt/strategy/macd_kdj.py run
# python3 plugins/cryptocurrency_trade/ccxt/strategy/macd_kdj.py long

View File

@@ -1,4 +1,4 @@
# cd /www/server/mdserver-web && source bin/activate
# cd /www/server/mdserver-web && . bin/activate
# python3 plugins/cryptocurrency_trade/ccxt/strategy/momentun_trade.py run
# python3 plugins/cryptocurrency_trade/ccxt/strategy/momentun_trade.py long

View File

@@ -1,4 +1,4 @@
# cd /www/server/mdserver-web && source bin/activate
# cd /www/server/mdserver-web && . bin/activate
# python3 plugins/cryptocurrency_trade/ccxt/strategy/notify_demo.py run
# python3 plugins/cryptocurrency_trade/ccxt/strategy/notify_demo.py long

View File

@@ -1,4 +1,4 @@
# cd /www/server/mdserver-web && source bin/activate
# cd /www/server/mdserver-web && . bin/activate
# python3 plugins/cryptocurrency_trade/ccxt/strategy/on_g_test.py t_buy_open
# python3 plugins/cryptocurrency_trade/ccxt/strategy/on_g_test.py t_buy_close

View File

@@ -1,4 +1,4 @@
# cd /www/server/mdserver-web && source bin/activate
# cd /www/server/mdserver-web && . bin/activate
# python3 plugins/cryptocurrency_trade/ccxt/strategy/online_macd_trade.py run
# python3 plugins/cryptocurrency_trade/ccxt/strategy/online_macd_trade.py long

View File

@@ -1,4 +1,4 @@
# cd /www/server/mdserver-web && source bin/activate
# cd /www/server/mdserver-web && . bin/activate
# python3 plugins/cryptocurrency_trade/ccxt/strategy/online_test.py t_buy_open
# python3 plugins/cryptocurrency_trade/ccxt/strategy/online_test.py t_buy_close

View File

@@ -11,7 +11,7 @@ from pprint import pprint
sys.path.append(os.getcwd() + "/plugins/cryptocurrency_trade/strategy")
import common
# cd /www/server/mdserver-web && source bin/activate
# cd /www/server/mdserver-web && . bin/activate
# python3 plugins/cryptocurrency_trade/ccxt/strategy/rsi_robot.py run

View File

@@ -1,4 +1,4 @@
# cd /www/server/mdserver-web && source bin/activate
# cd /www/server/mdserver-web && . bin/activate
# python3 plugins/cryptocurrency_trade/ccxt/strategy/vega_trade.py run
# python3 plugins/cryptocurrency_trade/ccxt/strategy/vega_trade.py long

View File

@@ -5,7 +5,7 @@ pip install git+https://github.com/catalyst-team/catalyst@master --upgrade
cd /www/server/mdserver-web && python3 plugins/cryptocurrency_trade/ccxt/test/p1.py
cd /Users/midoks/Desktop/mwdev/server/mdserver-web && source bin/activate
cd /Users/midoks/Desktop/mwdev/server/mdserver-web && . bin/activate
python3 plugins/cryptocurrency_trade/ccxt/test/p1.py
'''

View File

@@ -5,7 +5,7 @@ pip install git+https://github.com/catalyst-team/catalyst@master --upgrade
cd /www/server/mdserver-web && python3 plugins/cryptocurrency_trade/ccxt/test/p1.py
cd /Users/midoks/Desktop/mwdev/server/mdserver-web && source bin/activate
cd /Users/midoks/Desktop/mwdev/server/mdserver-web && . bin/activate
python3 plugins/cryptocurrency_trade/ccxt/test/p1.py
'''

View File

@@ -9,10 +9,10 @@ from catalyst import run_algorithm
from catalyst.api import order, record, symbol
'''
cd /Users/midoks/Desktop/mwdev/server/mdserver-web && source bin/activate
cd /Users/midoks/Desktop/mwdev/server/mdserver-web && / bin/activate
cd /www/server/mdserver-web && source bin/activate && source activate catalys
cd /www/server/mdserver-web && . bin/activate && source activate catalys
cd /Users/midoks/Desktop/mwdev/server/mdserver-web && python3 plugins/cryptocurrency_trade/ccxt/test/p_test.py
catalyst ingest-exchange -x binance -i btc_usdt -f minute

View File

@@ -1,5 +1,5 @@
[program:{$NAME}]
command=bash -c "cd {$RUN_ROOT} && source bin/activate && python3 {$ABS_FILE} long"
command=bash -c "cd {$RUN_ROOT} && . bin/activate && python3 {$ABS_FILE} long"
directory={$RUN_ROOT}
autorestart=true
startsecs=3

View File

@@ -1,5 +1,5 @@
[program:{$NAME}]
command=bash -c "cd {$RUN_ROOT} && source bin/activate && python3 plugins/cryptocurrency_trade/ccxt/public_data/data.py long"
command=bash -c "cd {$RUN_ROOT} && . bin/activate && python3 plugins/cryptocurrency_trade/ccxt/public_data/data.py long"
directory={$RUN_ROOT}
autorestart=true
startsecs=3

View File

@@ -14,7 +14,7 @@ VERSION=$2
# pip3 install ccxt
if [ -f ${rootPath}/bin/activate ];then
source ${rootPath}/bin/activate
. ${rootPath}/bin/activate
fi
pip3 install ccxt
pip3 install pandas
@@ -56,7 +56,7 @@ Uninstall_App()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_App
else
Uninstall_App

View File

@@ -26,7 +26,7 @@ Uninstall_App()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_App
else
Uninstall_App

View File

@@ -37,6 +37,7 @@ class nosqlMemcached():
__DB_HOST = '127.0.0.1'
__DB_CONN = None
__DB_ERR = None
__DB_STATUS = None
__DB_LOCAL = None
@@ -48,19 +49,36 @@ class nosqlMemcached():
if self.__DB_HOST in ['127.0.0.1', 'localhost']:
mem_path = "{}/memcached".format(mw.getServerDir())
if not os.path.exists(mem_path): return False
if not os.path.exists(mem_path):
self.__DB_STATUS = 'not_installed'
return False
if not self.__DB_LOCAL:
if not self.__config:
self.__DB_STATUS = 'not_installed'
return False
self.__DB_PORT = int(self.__config['port'])
try:
self.__DB_CONN = pymemcache.client.base.PooledClient((self.__DB_HOST,self.__DB_PORT), max_pool_size=4)
# PooledClient 是惰性连接,探测一次,服务未启动时及时返回 False
self.__DB_CONN.version()
self.__DB_STATUS = None
return self.__DB_CONN
except pymemcache.exceptions.MemcacheError:
self.__DB_STATUS = 'not_running'
return False
except (ConnectionRefusedError, OSError):
self.__DB_STATUS = 'not_running'
return False
except Exception:
self.__DB_ERR = mw.getTracebackInfo()
self.__DB_STATUS = 'not_running'
return False
# 连接状态:not_installed 未安装 / not_running 未启动 / None 正常
def get_status(self):
return self.__DB_STATUS
# 获取配置项
def get_options(self, get=None):
@@ -95,11 +113,20 @@ class nosqlMemcachedCtr():
instance = nosqlMemcached()
return instance
def _connect(self, sid):
obj = self.getInstanceBySid(sid)
conn = obj.conn()
if conn is False:
if obj.get_status() == 'not_installed':
return None, mw.returnData(False, '未安装')
return None, mw.returnData(False, '未启动')
return conn, None
def getItems(self, args):
sid = args['sid']
mem_instance = self.getInstanceBySid(sid).conn()
if mem_instance is False:
return mw.returnData(False,'无法链接')
mem_instance, err = self._connect(sid)
if err:
return err
result = {}
m_items = mem_instance.stats('items')
@@ -122,9 +149,9 @@ class nosqlMemcachedCtr():
def getKeyList(self, args):
sid = args['sid']
mem_instance = self.getInstanceBySid(sid).conn()
if mem_instance is False:
return mw.returnData(False,'无法链接')
mem_instance, err = self._connect(sid)
if err:
return err
p = 1
@@ -194,9 +221,9 @@ class nosqlMemcachedCtr():
def delVal(self, args):
sid = args['sid']
mem_instance = self.getInstanceBySid(sid).conn()
if mem_instance is False:
return mw.returnData(False,'无法链接')
mem_instance, err = self._connect(sid)
if err:
return err
key = args['key']
mem_instance.delete(key)
@@ -205,9 +232,9 @@ class nosqlMemcachedCtr():
def setKv(self, args):
sid = args['sid']
mem_instance = self.getInstanceBySid(sid).conn()
if mem_instance is False:
return mw.returnData(False,'无法链接')
mem_instance, err = self._connect(sid)
if err:
return err
key = args['key']
val = args['val']
@@ -217,9 +244,9 @@ class nosqlMemcachedCtr():
def clear(self, args):
sid = args['sid']
mem_instance = self.getInstanceBySid(sid).conn()
if mem_instance is False:
return mw.returnData(False,'无法链接')
mem_instance, err = self._connect(sid)
if err:
return err
mem_instance.flush_all()
return mw.returnData(True,'清空成功!')

View File

@@ -127,6 +127,7 @@ class nosqlMongodb():
__DB_HOST = '127.0.0.1'
__DB_CONN = None
__DB_ERR = None
__DB_STATUS = None
__DB_LOCAL = None
@@ -138,29 +139,51 @@ class nosqlMongodb():
if self.__DB_HOST in ['127.0.0.1', 'localhost']:
mgdb_path = "{}/mongodb".format(mw.getServerDir())
if not os.path.exists(mgdb_path): return False
if not os.path.exists(mgdb_path):
self.__DB_STATUS = 'not_installed'
return False
if not self.__DB_LOCAL:
if not self.__config:
self.__DB_STATUS = 'not_installed'
return False
self.__DB_PORT = int(self.__config['port'])
auth = getConfAuth()
port = getConfPort()
mg_root = pSqliteDb('config').where('id=?', (1,)).getField('mg_root')
# print(auth,self.__DB_HOST,port, self.__DB_PASS)
try:
if auth == 'disabled':
self.__DB_CONN = pymongo.MongoClient(host=self.__DB_HOST, port=port, directConnection=True)
self.__DB_CONN = pymongo.MongoClient(host=self.__DB_HOST, port=port, directConnection=True, serverSelectionTimeoutMS=3000)
else:
self.__DB_CONN = pymongo.MongoClient(host=self.__DB_HOST, port=port, directConnection=True, username='root',password=mg_root)
self.__DB_CONN = pymongo.MongoClient(host=self.__DB_HOST, port=port, directConnection=True, username='root',password=mg_root, serverSelectionTimeoutMS=3000)
self.__DB_CONN.admin.command('ping')
# 节点处于 recovering/startup 时 ping 仍会成功,但读写会抛 NotPrimaryError
try:
hello = self.__DB_CONN.admin.command('hello')
except Exception:
# MongoDB < 5.0 没有 hello 命令
hello = self.__DB_CONN.admin.command('isMaster')
if not (hello.get('isWritablePrimary') or hello.get('ismaster') or hello.get('secondary')):
self.__DB_ERR = 'MongoDB 节点当前不是 primary 或 secondary 状态'
return False
self.__DB_STATUS = None
self.__DB_ERR = None
return self.__DB_CONN
except pymongo.errors.ConnectionFailure:
self.__DB_STATUS = 'not_running'
return False
except Exception as e:
# print(e)
self.__DB_ERR = mw.getTracebackInfo()
except Exception:
self.__DB_STATUS = 'not_running'
return False
# 连接状态:not_installed 未安装 / not_running 未启动 / None 正常
def get_status(self):
return self.__DB_STATUS
def get_err(self):
return self.__DB_ERR
# 获取配置项
def get_options(self, get=None):
result = {}
@@ -202,11 +225,23 @@ class nosqlMongodbCtr():
instance = nosqlMongodb()
return instance
def _connect(self, sid):
obj = self.getInstanceBySid(sid)
conn = obj.mgdb_conn()
if conn is False:
if obj.get_status() == 'not_installed':
return None, mw.returnData(False, '未安装')
err = obj.get_err()
if err:
return None, mw.returnData(False, err)
return None, mw.returnData(False, '未启动')
return conn, None
def getDbList(self, args):
sid = args['sid']
mgdb_instance = self.getInstanceBySid(sid).mgdb_conn()
if mgdb_instance is False:
return mw.returnData(False,'无法链接')
mgdb_instance, err = self._connect(sid)
if err:
return err
result = {}
doc_list = mgdb_instance.list_database_names()
@@ -221,9 +256,9 @@ class nosqlMongodbCtr():
sid = args['sid']
name = args['name']
mgdb_instance = self.getInstanceBySid(sid).mgdb_conn()
if mgdb_instance is False:
return mw.returnData(False,'无法链接.')
mgdb_instance, err = self._connect(sid)
if err:
return err
result = {}
collections = mgdb_instance[name].list_collection_names()
@@ -242,9 +277,9 @@ class nosqlMongodbCtr():
if 'size' in args:
size = args['size']
mgdb_instance = self.getInstanceBySid(sid).mgdb_conn()
if mgdb_instance is False:
return mw.returnData(False,'无法链接')
mgdb_instance, err = self._connect(sid)
if err:
return err
db_instance = mgdb_instance[db]
collection_instance = db_instance[collection]
@@ -303,9 +338,9 @@ class nosqlMongodbCtr():
db = args['db']
collection = args['collection']
mgdb_instance = self.getInstanceBySid(sid).mgdb_conn()
if mgdb_instance is False:
return mw.returnData(False,'无法链接')
mgdb_instance, err = self._connect(sid)
if err:
return err
db_instance = mgdb_instance[db]
collection_instance = db_instance[collection]

View File

@@ -32,6 +32,7 @@ class nosqlRedis():
__DB_HOST = '127.0.0.1'
__DB_CONN = None
__DB_ERR = None
__DB_STATUS = None
__DB_LOCAL = None
@@ -44,9 +45,13 @@ class nosqlRedis():
if self.__DB_HOST in ['127.0.0.1', 'localhost']:
redis_path = "{}/redis".format(mw.getServerDir())
if not os.path.exists(redis_path):
self.__DB_STATUS = 'not_installed'
return False
if not self.__DB_LOCAL:
if not self.__config:
self.__DB_STATUS = 'not_installed'
return False
self.__DB_PASS = self.__config['requirepass']
self.__DB_PORT = int(self.__config['port'])
@@ -55,13 +60,20 @@ class nosqlRedis():
redis_pool = redis.ConnectionPool(host=self.__DB_HOST, port=self.__DB_PORT, password=self.__DB_PASS, db=db_idx, socket_timeout=3)
self.__DB_CONN = redis.Redis(connection_pool=redis_pool)
self.__DB_CONN.ping()
self.__DB_STATUS = None
return self.__DB_CONN
except redis.exceptions.ConnectionError:
self.__DB_STATUS = 'not_running'
return False
except Exception:
self.__DB_ERR = mw.getTracebackInfo()
self.__DB_STATUS = 'not_running'
return False
# 连接状态:not_installed 未安装 / not_running 未启动 / None 正常
def get_status(self):
return self.__DB_STATUS
# 获取配置项
def get_options(self, get=None):
@@ -112,12 +124,21 @@ class nosqlRedisCtr():
instance = nosqlRedis()
return instance
def _connect(self, sid, idx=0):
obj = self.getInstanceBySid(sid)
conn = obj.redis_conn(idx)
if conn is False:
if obj.get_status() == 'not_installed':
return None, mw.returnData(False, '未安装')
return None, mw.returnData(False, '未启动')
return conn, None
def getList(self, args):
sid = args['sid']
redis_instance = self.getInstanceBySid(sid).redis_conn(0)
if redis_instance is False:
return mw.returnData(False,'无法链接')
redis_instance, err = self._connect(sid, 0)
if err:
return err
redis_info = redis_instance.info()
@@ -166,7 +187,9 @@ class nosqlRedisCtr():
if 'search' in args and args['search'] != '':
search = args['search']
redis_instance = self.getInstanceBySid(sid).redis_conn(idx)
redis_instance, err = self._connect(sid, idx)
if err:
return err
total = redis_instance.dbsize()
@@ -251,7 +274,9 @@ class nosqlRedisCtr():
val = args["val"]
endtime = args["endtime"]
redis_instance = self.getInstanceBySid(sid).redis_conn(idx)
redis_instance, err = self._connect(sid, idx)
if err:
return err
redis_info = redis_instance.info()
if redis_info['role'] == 'slave':
@@ -268,7 +293,9 @@ class nosqlRedisCtr():
sid = args['sid']
idx = args['idx']
name = args["name"]
redis_instance = self.getInstanceBySid(sid).redis_conn(idx)
redis_instance, err = self._connect(sid, idx)
if err:
return err
redis_info = redis_instance.info()
if redis_info['role'] == 'slave':
@@ -281,7 +308,9 @@ class nosqlRedisCtr():
sid = args['sid']
idx = args['idx']
keys = args["keys"]
redis_instance = self.getInstanceBySid(sid).redis_conn(idx)
redis_instance, err = self._connect(sid, idx)
if err:
return err
redis_info = redis_instance.info()
if redis_info['role'] == 'slave':
@@ -297,7 +326,9 @@ class nosqlRedisCtr():
idxs = args['idxs']
for idx in idxs:
redis_instance = self.getInstanceBySid(sid).redis_conn(idx)
redis_instance, err = self._connect(sid, idx)
if err:
return err
redis_info = redis_instance.info()
if redis_info['role'] == 'slave':

View File

@@ -31,6 +31,7 @@ class nosqlMySQL():
__DB_HOST = '127.0.0.1'
__DB_CONN = None
__DB_ERR = None
__DB_STATUS = None
__DB_SOCKET = None
__DB_LOCAL = None
@@ -45,13 +46,19 @@ class nosqlMySQL():
def conn(self):
if self.__sid is None:
self.__DB_STATUS = 'not_installed'
return False
if self.__sid is not None:
mycnf_path = "{}/{}/etc/my.cnf".format(mw.getServerDir(),self.__sid)
if not os.path.exists(mycnf_path):
self.__DB_STATUS = 'not_installed'
return False
if not self.__config:
self.__DB_STATUS = 'not_installed'
return False
self.__DB_PORT = int(self.__config['port'])
self.__DB_USER = self.__config['username']
self.__DB_PASS = self.__config['password']
@@ -65,11 +72,19 @@ class nosqlMySQL():
if self.__DB_SOCKET != '':
db.setSocket(self.__DB_SOCKET)
# 实际连通性检查:服务未启动或账号错误时返回 False,调用方统一提示
db.query('select 1')
self.__DB_STATUS = None
return db
except Exception:
self.__DB_ERR = mw.get_error_info()
self.__DB_ERR = mw.getTracebackInfo()
self.__DB_STATUS = 'not_running'
return False
# 连接状态:not_installed 未安装 / not_running 未启动 / None 正常
def get_status(self):
return self.__DB_STATUS
def sqliteDb(self, db_pos_name, dbname='databases'):
mydb_path = mw.getServerDir() +'/'+db_pos_name
name = 'mysql'
@@ -84,7 +99,7 @@ class nosqlMySQL():
result['host'] = '127.0.0.1'
result['username'] = 'root'
if sid in ['mysql', 'mysql-apt', 'mysql-yum', 'mysql-community']:
if sid in ['mysql', 'mysql-apt', 'mysql-yum', 'mysql-community','mariadb']:
my_cnf_path = "{}/{}/etc/my.cnf".format(mw.getServerDir(),sid)
if not os.path.exists(my_cnf_path):
return False
@@ -136,6 +151,10 @@ class nosqlMySQL():
local_mysql_yum = "{}/mysql-community/etc/my.cnf".format(mw.getServerDir())
if os.path.exists(local_mysql_yum):
data.append({'name':'本地服务器[Tar]', 'val':'mysql-community'})
local_mysql_yum = "{}/mariadb/etc/my.cnf".format(mw.getServerDir())
if os.path.exists(local_mysql_yum):
data.append({'name':'本地服务器[mariadb]', 'val':'mariadb'})
return mw.returnData(True, 'ok', data)
@singleton
@@ -153,11 +172,20 @@ class nosqlMySQLCtr():
instance.setSid(sid)
return instance
def _connect(self, sid):
obj = self.getInstanceBySid(sid)
conn = obj.conn()
if conn is False:
if obj.get_status() == 'not_installed':
return None, mw.returnData(False, '未安装')
return None, mw.returnData(False, '未启动')
return conn, None
def getDbList(self, args):
sid = args['sid']
my_instance = self.getInstanceBySid(sid).conn()
if my_instance is False:
return mw.returnData(False,'无法链接')
my_instance, err = self._connect(sid)
if err:
return err
result = {}
db_list = my_instance.query('show databases')
@@ -172,9 +200,9 @@ class nosqlMySQLCtr():
sid = args['sid']
db = args['db']
my_instance = self.getInstanceBySid(sid).conn()
if my_instance is False:
return mw.returnData(False,'无法链接')
my_instance, err = self._connect(sid)
if err:
return err
sql = "select * from information_schema.tables where table_schema = '"+db+"'"
table_list = my_instance.query(sql)
@@ -226,9 +254,9 @@ class nosqlMySQLCtr():
else:
where_sql = ' where '+args_where['field'] + " like '%"+args_where['value']+"%' "
my_instance = self.getInstanceBySid(sid).conn()
if my_instance is False:
return mw.returnData(False,'无法链接')
my_instance, err = self._connect(sid)
if err:
return err
my_instance.setDbName(db)
sql = 'select count(*) as num from ' + table + where_sql
@@ -268,9 +296,9 @@ class nosqlMySQLCtr():
sql = 'show processlist';
sid = args['sid']
my_instance = self.getInstanceBySid(sid).conn()
if my_instance is False:
return mw.returnData(False,'无法链接')
my_instance, err = self._connect(sid)
if err:
return err
result = my_instance.query(sql)
rdata = {}
@@ -281,9 +309,9 @@ class nosqlMySQLCtr():
sql = 'show status';
sid = args['sid']
my_instance = self.getInstanceBySid(sid).conn()
if my_instance is False:
return mw.returnData(False,'无法链接')
my_instance, err = self._connect(sid)
if err:
return err
result = my_instance.query(sql)
rdata = {}
@@ -294,9 +322,9 @@ class nosqlMySQLCtr():
sql = "show status like 'Com_%'";
sid = args['sid']
my_instance = self.getInstanceBySid(sid).conn()
if my_instance is False:
return mw.returnData(False,'无法链接')
my_instance, err = self._connect(sid)
if err:
return err
result = my_instance.query(sql)
rdata = {}
@@ -331,9 +359,9 @@ class nosqlMySQLCtr():
def getNetList(self, args):
from datetime import datetime
sid = args['sid']
my_instance = self.getInstanceBySid(sid).conn()
if my_instance is False:
return mw.returnData(False,'无法链接')
my_instance, err = self._connect(sid)
if err:
return err
rdata = []
row = {}
@@ -369,9 +397,9 @@ class nosqlMySQLCtr():
def getTopnList(self, args):
sid = args['sid']
my_instance = self.getInstanceBySid(sid).conn()
if my_instance is False:
return mw.returnData(False,'无法链接')
my_instance, err = self._connect(sid)
if err:
return err
is_performance_schema = my_instance.find("SELECT @@performance_schema")
if is_performance_schema is None:
@@ -399,9 +427,9 @@ class nosqlMySQLCtr():
# 查看重复或冗余的索引
def getRedundantIndexes(self, args):
sid = args['sid']
my_instance = self.getInstanceBySid(sid).conn()
if my_instance is False:
return mw.returnData(False,'无法链接')
my_instance, err = self._connect(sid)
if err:
return err
is_performance_schema = my_instance.find("SELECT @@performance_schema")
if is_performance_schema["@@performance_schema"] == 0:
@@ -417,9 +445,9 @@ class nosqlMySQLCtr():
def redundantIndexesCmd(self, args):
sid = args['sid']
my_instance = self.getInstanceBySid(sid).conn()
if my_instance is False:
return mw.returnData(False,'无法链接')
my_instance, err = self._connect(sid)
if err:
return err
is_performance_schema = my_instance.find("SELECT @@performance_schema")
if is_performance_schema["@@performance_schema"] == 0:
@@ -442,29 +470,53 @@ class nosqlMySQLCtr():
from decimal import Decimal
sid = args['sid']
my_instance = self.getInstanceBySid(sid).conn()
if my_instance is False:
return mw.returnData(False,'无法链接')
my_instance, err = self._connect(sid)
if err:
return err
my_instance.execute("SET sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''))")
# ANY_VALUE 是 MySQL 5.7+ 的函数,MariaDB 不支持(报 FUNCTION ANY_VALUE does not exist);
# 上面已去掉 ONLY_FULL_GROUP_BY,MariaDB 可直接取非聚合字段
ver = my_instance.find("SELECT @@version as db_version")
is_mariadb = ver is not None and 'MariaDB' in str(ver.get('db_version', ''))
def any_val(expr):
return expr if is_mariadb else 'ANY_VALUE(' + expr + ')'
data = my_instance.query(
"""
SELECT t.TABLE_SCHEMA as TABLE_SCHEMA, t.TABLE_NAME as TABLE_NAME, t.ENGINE as ENGINE,
IFNULL(t.DATA_LENGTH/1024/1024/1024, 0) as DATA_LENGTH,
IFNULL(t.INDEX_LENGTH/1024/1024/1024, 0) as INDEX_LENGTH,
IFNULL((DATA_LENGTH+INDEX_LENGTH)/1024/1024/1024, 0) AS TOTAL_LENGTH,
c.column_name AS COLUMN_NAME, c.data_type AS DATA_TYPE, c.COLUMN_TYPE AS COLUMN_TYPE,
t.AUTO_INCREMENT AS AUTO_INCREMENT, locate('unsigned', c.COLUMN_TYPE) = 0 AS IS_SIGNED
FROM information_schema.TABLES t
JOIN information_schema.COLUMNS c ON t.TABLE_SCHEMA = c.TABLE_SCHEMA AND t.table_name=c.table_name
WHERE t.TABLE_SCHEMA NOT IN ('mysql', 'information_schema', 'performance_schema', 'sys')
GROUP BY TABLE_NAME
ORDER BY TOTAL_LENGTH DESC, AUTO_INCREMENT DESC;
"""
SELECT t.TABLE_SCHEMA as TABLE_SCHEMA, t.TABLE_NAME as TABLE_NAME,
{engine} as ENGINE,
{data_length} as DATA_LENGTH,
{index_length} as INDEX_LENGTH,
{total_length} AS TOTAL_LENGTH,
{column_name} AS COLUMN_NAME, {data_type} AS DATA_TYPE,
{column_type} AS COLUMN_TYPE,
{auto_increment} AS AUTO_INCREMENT,
{is_signed} AS IS_SIGNED
FROM information_schema.TABLES t
JOIN information_schema.COLUMNS c ON t.TABLE_SCHEMA = c.TABLE_SCHEMA AND t.table_name=c.table_name
WHERE t.TABLE_SCHEMA NOT IN ('mysql', 'information_schema', 'performance_schema', 'sys')
GROUP BY t.TABLE_SCHEMA, t.TABLE_NAME
ORDER BY TOTAL_LENGTH DESC, AUTO_INCREMENT DESC
""".format(
engine=any_val("t.ENGINE"),
data_length=any_val("IFNULL(t.DATA_LENGTH/1024/1024/1024, 0)"),
index_length=any_val("IFNULL(t.INDEX_LENGTH/1024/1024/1024, 0)"),
total_length=any_val("IFNULL((t.DATA_LENGTH+t.INDEX_LENGTH)/1024/1024/1024, 0)"),
column_name=any_val("c.column_name"),
data_type=any_val("c.data_type"),
column_type=any_val("c.COLUMN_TYPE"),
auto_increment=any_val("t.AUTO_INCREMENT"),
is_signed=any_val("locate('unsigned', c.COLUMN_TYPE) = 0"),
)
)
if data is None:
return mw.returnData(True, 'ok', [])
if isinstance(data, Exception):
return mw.returnData(False, '查询失败: ' + str(data))
for i in range(len(data)):
row = data[i]
@@ -515,9 +567,9 @@ class nosqlMySQLCtr():
# 查看应用端IP连接数总和
def getConnCount(self, args):
sid = args['sid']
my_instance = self.getInstanceBySid(sid).conn()
if my_instance is False:
return mw.returnData(False,'无法链接')
my_instance, err = self._connect(sid)
if err:
return err
data = my_instance.query(
"SELECT user,db,substring_index(HOST,':',1) AS Client_IP,count(1) AS count FROM information_schema.PROCESSLIST "
@@ -539,9 +591,9 @@ class nosqlMySQLCtr():
# 快速找出没有主键的表
def getFpkInfo(self, args):
sid = args['sid']
my_instance = self.getInstanceBySid(sid).conn()
if my_instance is False:
return mw.returnData(False,'无法链接')
my_instance, err = self._connect(sid)
if err:
return err
data = my_instance.query(
"""
@@ -561,9 +613,9 @@ class nosqlMySQLCtr():
def getLockSql(self, args):
sid = args['sid']
my_instance = self.getInstanceBySid(sid).conn()
if my_instance is False:
return mw.returnData(False,'无法链接')
my_instance, err = self._connect(sid)
if err:
return err
data = my_instance.query(
"""
@@ -592,9 +644,9 @@ class nosqlMySQLCtr():
def killLockPid(self, args):
sid = args['sid']
my_instance = self.getInstanceBySid(sid).conn()
if my_instance is False:
return mw.returnData(False,'无法链接')
my_instance, err = self._connect(sid)
if err:
return err
pid = args['pid']
my_instance.execute('kill %s' % pid)
@@ -602,9 +654,9 @@ class nosqlMySQLCtr():
def killAllLock(self, args):
sid = args['sid']
my_instance = self.getInstanceBySid(sid).conn()
if my_instance is False:
return mw.returnData(False,'无法链接')
my_instance, err = self._connect(sid)
if err:
return err
data = self.getLockSql(args)
if data['status']:
@@ -619,9 +671,9 @@ class nosqlMySQLCtr():
def getDeadlockInfo(self, args):
sid = args['sid']
my_instance = self.getInstanceBySid(sid).conn()
if my_instance is False:
return mw.returnData(False,'无法链接')
my_instance, err = self._connect(sid)
if err:
return err
data = my_instance.find("SHOW ENGINE INNODB STATUS")
if data is not None:
@@ -634,29 +686,45 @@ class nosqlMySQLCtr():
def getSlaveStatus(self, args):
sid = args['sid']
my_instance = self.getInstanceBySid(sid).conn()
if my_instance is False:
return mw.returnData(False,'无法链接')
my_instance, err = self._connect(sid)
if err:
return err
slave_info = my_instance.find('SHOW SLAVE STATUS')
if slave_info is None:
# MySQL 8.0.22+ 使用 SHOW REPLICA STATUS,MySQL 9.0 已移除 SHOW SLAVE STATUS
slave_data = my_instance.query('SHOW REPLICA STATUS')
if isinstance(slave_data, Exception):
# 兼容 MySQL 8.0.22 以下及旧版 MariaDB
slave_data = my_instance.query('SHOW SLAVE STATUS')
if isinstance(slave_data, Exception):
return mw.returnData(False, '获取主从状态失败: ' + str(slave_data))
if slave_data is None or len(slave_data) == 0:
return mw.returnData(True, 'ok', '未开启从库!')
slave_info = slave_data[0]
# 兼容新旧字段名: MySQL 8.0.22+ 将 Slave_*/Seconds_Behind_Master 重命名为 Replica_*/Seconds_Behind_Source
io_running = slave_info.get('Replica_IO_Running', slave_info.get('Slave_IO_Running'))
sql_running = slave_info.get('Replica_SQL_Running', slave_info.get('Slave_SQL_Running'))
seconds_behind = slave_info.get('Seconds_Behind_Source', slave_info.get('Seconds_Behind_Master'))
msg = ''
if slave_info['Auto_Position'] != 1:
if slave_info.get('Auto_Position') != 1:
msg += '你没有开启基于GTID全局事务ID复制,请确保CHANGE MASTER TO MASTER_AUTO_POSITION = 1.\n'
if slave_info['Slave_IO_Running'] == 'Yes' and slave_info['Slave_SQL_Running'] == 'Yes':
if slave_info['Seconds_Behind_Master'] == 0:
if io_running == 'Yes' and sql_running == 'Yes':
if seconds_behind == 0:
msg = "同步正常,无延迟"
return mw.returnData(True, 'ok', msg)
else:
return mw.returnData(True, 'ok', '同步正常,但有延迟,延迟时间为:%s' % slave_info['Seconds_Behind_Master'])
return mw.returnData(True, 'ok', '同步正常,但有延迟,延迟时间为:%s' % seconds_behind)
else:
msg = '主从复制报错,请检查\nSlave_IO_Running状态值是:%s, | Slave_SQL_Running状态值是:%s\nLast_Error错误信息是:%s\nLast_SQL_Error错误信息是:%s\n' \
% (slave_info['Slave_IO_Running'], slave_info['Slave_SQL_Running'], slave_info['Last_Error'], slave_info['Last_SQL_Error'])
error_dict = my_instance.find('select LAST_ERROR_NUMBER,LAST_ERROR_MESSAGE,LAST_ERROR_TIMESTAMP from performance_schema.replication_applier_status_by_worker ORDER BY LAST_ERROR_TIMESTAMP desc limit 1')
% (io_running, sql_running, slave_info.get('Last_Error'), slave_info.get('Last_SQL_Error'))
error_data = my_instance.query('select LAST_ERROR_NUMBER,LAST_ERROR_MESSAGE,LAST_ERROR_TIMESTAMP from performance_schema.replication_applier_status_by_worker ORDER BY LAST_ERROR_TIMESTAMP desc limit 1')
if isinstance(error_data, Exception) or not error_data:
msg += 'MySQL Replication Health is NOT OK!'
return mw.returnData(True, 'ok', msg)
error_dict = error_data[0]
msg += '错误号是:%s \n' % error_dict['LAST_ERROR_NUMBER']
msg += '错误信息是:%s \n' % error_dict['LAST_ERROR_MESSAGE']
msg += '报错时间是:%s \n' % error_dict['LAST_ERROR_TIMESTAMP']

View File

@@ -0,0 +1,825 @@
# coding:utf-8
import sys
import os
import re
import json
import time
import psycopg2
import psycopg2.extras
web_dir = os.getcwd() + "/web"
if os.path.exists(web_dir):
sys.path.append(web_dir)
os.chdir(web_dir)
import core.mw as mw
PG_SYSTEM_SCHEMAS = ('pg_catalog', 'information_schema', 'pg_toast')
def getPluginName():
return 'postgresql'
def getServerDir():
return mw.getServerDir() + '/' + getPluginName()
def getConf():
return getServerDir() + '/data/postgresql.conf'
def isInstalled():
return os.path.exists(getConf())
def getPort():
content = mw.readFile(getConf())
if content:
tmp = re.search(r'^[#\s]*port\s*=\s*(\d+)', content, re.M)
if tmp:
return int(tmp.groups()[0])
return 5432
def getSocketDir():
sock_name = '.s.PGSQL.' + str(getPort())
for sock_dir in ['/tmp', getServerDir()]:
if os.path.exists(sock_dir + '/' + sock_name):
return sock_dir
return ''
def quoteIdent(name):
return '"' + str(name).replace('"', '""') + '"'
def quoteTable(name):
return '.'.join(quoteIdent(x) for x in str(name).split('.'))
def fmtValue(value):
if value is None:
return None
if isinstance(value, (dict, list, tuple)):
return json.dumps(value, ensure_ascii=False, default=str)
if isinstance(value, (bytes, bytearray, memoryview)):
return bytes(value).hex()
if isinstance(value, (int, float, str, bool)):
return value
return str(value)
def fmtRows(rows):
ret = []
for row in rows:
item = {}
for k in row:
item[k] = fmtValue(row[k])
ret.append(item)
return ret
class PgClient:
def __init__(self, database='postgres'):
self.database = database
self.status = None
self.error = None
self.conn = None
def connect(self):
if not isInstalled():
self.status = 'not_installed'
return False
try:
host = getSocketDir()
if host == '':
host = '127.0.0.1'
self.conn = psycopg2.connect(database=self.database,
user='postgres',
host=host,
port=getPort(),
connect_timeout=3)
self.conn.autocommit = True
return True
except psycopg2.OperationalError as e:
msg = str(e).strip()
if 'does not exist' in msg:
self.status = 'db_not_found'
elif 'authentication' in msg or 'password' in msg:
self.status = 'auth_error'
else:
self.status = 'not_running'
self.error = msg
except Exception as e:
self.status = 'not_running'
self.error = str(e)
return False
def query(self, sql, params=()):
cur = self.conn.cursor(cursor_factory=psycopg2.extras.RealDictCursor)
try:
# 无参数时不能传空 tuple,否则 SQL 里的 % 会被当作占位符
if params:
cur.execute(sql, params)
else:
cur.execute(sql)
rows = cur.fetchall()
return [dict(x) for x in rows]
finally:
cur.close()
def one(self, sql, params=()):
rows = self.query(sql, params)
if len(rows) == 0:
return None
return rows[0]
def execute(self, sql, params=()):
cur = self.conn.cursor()
try:
if params:
cur.execute(sql, params)
else:
cur.execute(sql)
return cur.rowcount
finally:
cur.close()
def close(self):
if self.conn:
self.conn.close()
self.conn = None
def openClient(args, database='postgres'):
client = PgClient(database)
if client.connect():
return client, None
if client.status == 'not_installed':
msg = '未安装'
elif client.status == 'not_running':
msg = '未启动'
elif client.status == 'db_not_found':
msg = '数据库不存在'
elif client.status == 'auth_error':
msg = '连接失败,请检查数据库认证配置'
else:
msg = client.error or '连接失败'
return None, mw.returnData(False, msg)
# 服务器列表
def get_server_list(args):
data = []
if isInstalled():
data.append({'name': '本地服务器', 'val': 'postgresql'})
return mw.returnData(True, 'ok', data)
# 数据库列表
def get_db_list(args):
client, err = openClient(args)
if err:
return err
try:
rows = client.query("select datname from pg_database where datistemplate = false order by datname")
result = {'list': [x['datname'] for x in rows]}
return mw.returnData(True, 'ok', result)
finally:
client.close()
# 数据表列表
def get_table_list(args):
db = args.get('db', '')
client, err = openClient(args, db)
if err:
return err
try:
sql = """
select n.nspname as schemaname, c.relname as tablename
from pg_class c
join pg_namespace n on n.oid = c.relnamespace
where c.relkind in ('r', 'p', 'v', 'm', 'f')
and n.nspname not in ('pg_catalog', 'information_schema', 'pg_toast')
and n.nspname not like 'pg_temp%'
order by n.nspname, c.relname
"""
rows = client.query(sql)
table_list = []
for x in rows:
if x['schemaname'] == 'public':
table_list.append(x['tablename'])
else:
table_list.append(x['schemaname'] + '.' + x['tablename'])
result = {'list': table_list}
return mw.returnData(True, 'ok', result)
finally:
client.close()
# 数据列表
def get_data_list(args):
db = args.get('db', '')
table = args.get('table', '')
p = 1
size = 10
if 'p' in args:
p = int(args['p'])
if 'size' in args:
size = int(args['size'])
start_index = (p - 1) * size
if table == '':
page_args = {}
page_args['count'] = 0
page_args['tojs'] = 'pgGetDataList'
page_args['p'] = 1
page_args['row'] = size
rdata = {}
rdata['page'] = mw.getPage(page_args)
rdata['list'] = []
rdata['count'] = 0
return mw.returnData(True, 'ok', rdata)
where_sql = ''
where_params = []
args_where = {}
if 'where' in args and isinstance(args['where'], dict):
args_where = args['where']
field = args_where.get('field', '')
if field and field != '0':
field_sql = quoteIdent(field)
value = str(args_where.get('value', ''))
if 'id' in field.lower():
where_sql = ' where ' + field_sql + ' = %s'
where_params.append(value)
else:
where_sql = ' where ' + field_sql + ' like %s'
where_params.append('%' + value + '%')
client, err = openClient(args, db)
if err:
return err
try:
try:
sql = 'select count(*) as num from ' + quoteTable(table) + where_sql
count_row = client.one(sql, tuple(where_params))
count = int(count_row['num'])
sql = 'select * from ' + quoteTable(table) + where_sql + ' limit %s offset %s'
params = tuple(where_params) + (size, start_index)
rows = client.query(sql, params)
rows = fmtRows(rows)
except psycopg2.errors.UndefinedTable:
return mw.returnData(False, '数据表不存在:' + table)
except psycopg2.errors.UndefinedColumn:
return mw.returnData(False, '字段不存在,请刷新后重试')
except psycopg2.Error as e:
return mw.returnData(False, '查询失败:' + str(e).strip())
page_args = {}
page_args['count'] = count
page_args['tojs'] = 'pgGetDataList'
page_args['p'] = p
page_args['row'] = size
rdata = {}
rdata['page'] = mw.getPage(page_args)
rdata['list'] = rows
rdata['count'] = count
rdata['soso_field'] = ''
if field and field != '0':
rdata['soso_field'] = field
return mw.returnData(True, 'ok', rdata)
finally:
client.close()
# 进程列表
def get_proccess_list(args):
client, err = openClient(args)
if err:
return err
try:
sql = """
select pid, usename as "user", datname as db,
coalesce(host(client_addr), '本地') as host,
application_name as command, state, query as info,
backend_start, xact_start, query_start,
wait_event_type, wait_event
from pg_stat_activity
where pid <> pg_backend_pid()
and backend_type = 'client backend'
order by pid
"""
rows = fmtRows(client.query(sql))
result = {'list': rows}
return mw.returnData(True, 'ok', result)
finally:
client.close()
# 状态列表
def get_status_list(args):
client, err = openClient(args)
if err:
return err
try:
sql = """
select name, setting, coalesce(unit, '') as unit,
category, short_desc
from pg_settings
order by name
"""
rows = fmtRows(client.query(sql))
result = {'list': rows}
return mw.returnData(True, 'ok', result)
finally:
client.close()
# 统计列表
def get_stats_list(args):
client, err = openClient(args)
if err:
return err
try:
sql = """
select datname as db,
numbackends as conn,
xact_commit as commit, xact_rollback as rollback,
blks_read, blks_hit,
tup_returned, tup_fetched, tup_inserted, tup_updated, tup_deleted,
deadlocks, conflicts, temp_files, temp_bytes,
round(100.0 * blks_hit / nullif(blks_hit + blks_read, 0), 2) as cache_hit_ratio
from pg_stat_database
where datname is not null
order by datname
"""
rows = fmtRows(client.query(sql))
result = {'list': rows}
return mw.returnData(True, 'ok', result)
finally:
client.close()
def _dbStatSnapshot(client):
sql = """
select coalesce(sum(tup_fetched), 0) as fetched,
coalesce(sum(tup_inserted), 0) as inserted,
coalesce(sum(tup_updated), 0) as updated,
coalesce(sum(tup_deleted), 0) as deleted,
coalesce(sum(xact_commit), 0) as commits
from pg_stat_database
"""
row = client.one(sql)
return {
'fetched': int(row['fetched']),
'inserted': int(row['inserted']),
'updated': int(row['updated']),
'deleted': int(row['deleted']),
'commits': int(row['commits']),
}
# QPS/TPS 指标
def get_net_list(args):
from datetime import datetime
client, err = openClient(args)
if err:
return err
try:
row1 = _dbStatSnapshot(client)
time.sleep(1)
row2 = _dbStatSnapshot(client)
max_conn = client.one("select setting from pg_settings where name = 'max_connections'")
conn_row = client.one("select count(*) as num from pg_stat_activity where backend_type = 'client backend'")
row = {}
row['current_time'] = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
row['select'] = row2['fetched'] - row1['fetched']
row['insert'] = row2['inserted'] - row1['inserted']
row['update'] = row2['updated'] - row1['updated']
row['delete'] = row2['deleted'] - row1['deleted']
row['conn'] = conn_row['num']
row['max_conn'] = max_conn['setting']
# PostgreSQL 的 pg_stat 不提供网络字节计数器
row['recv_mbps'] = '-'
row['send_mbps'] = '-'
rdata = []
rdata.append(row)
return mw.returnData(True, 'ok', rdata)
finally:
client.close()
# 查询执行次数最频繁的前N条SQL语句
def get_topn_list(args):
client, err = openClient(args)
if err:
return err
try:
avail = client.one("""
select default_version, installed_version
from pg_available_extensions
where name = 'pg_stat_statements'
""")
if avail is None:
return mw.returnData(False, '当前 PostgreSQL 未提供 pg_stat_statements 扩展(缺少 contrib 模块),无法使用该功能。')
# 先检查 shared_preload_libraries —— pg_stat_statements 必须预加载
preload = client.one("select setting from pg_settings where name = 'shared_preload_libraries'")
libs = (preload or {}).get('setting', '') or ''
if 'pg_stat_statements' not in libs:
return mw.returnData(False, "pg_stat_statements 扩展必须在启动时预加载。\n"
"请在 postgresql.conf 添加 shared_preload_libraries = 'pg_stat_statements' 后重启 PostgreSQL。")
# 再检查扩展是否已 CREATE
ext = client.one("select to_regclass('pg_stat_statements') as v")
if ext is None or ext['v'] is None:
return mw.returnData(False, "pg_stat_statements 扩展已预加载,但尚未启用。\n"
"请在当前数据库执行 CREATE EXTENSION pg_stat_statements;")
version_num = int(client.one('show server_version_num')['server_version_num'])
if version_num >= 130000:
total_col = 'total_exec_time'
max_col = 'max_exec_time'
mean_col = 'mean_exec_time'
else:
total_col = 'total_time'
max_col = 'max_time'
mean_col = 'mean_time'
sql = """
select s.query,
coalesce(d.datname, '-') as db,
'-' as last_seen,
s.calls as exec_count,
round(s.{max_col}::numeric, 2) as max_latency,
round(s.{mean_col}::numeric, 2) as avg_latency
from pg_stat_statements s
left join pg_database d on d.oid = s.dbid
""".format(max_col=max_col, mean_col=mean_col)
filter_db = args.get('filter_db', 'no')
if filter_db == 'yes':
sql += ' where d.datname is not null '
sql += ' order by s.calls desc limit 20'
rows = fmtRows(client.query(sql))
return mw.returnData(True, 'ok', rows)
finally:
client.close()
def _redundantIndexes(client):
sql = """
select n.nspname as table_schema,
t.relname as table_name,
ic.relname as redundant_index_name,
coalesce((
select string_agg(a.attname, ',' order by k.ord)
from unnest(i.indkey) with ordinality as k(attnum, ord)
join pg_attribute a on a.attrelid = i.indrelid and a.attnum = k.attnum
), '') as redundant_index_columns,
'DROP INDEX ' || quote_ident(n.nspname) || '.' || quote_ident(ic.relname) as sql_drop_index
from pg_index i
join pg_class t on t.oid = i.indrelid
join pg_namespace n on n.oid = t.relnamespace
join pg_class ic on ic.oid = i.indexrelid
where n.nspname not in ('pg_catalog', 'information_schema', 'pg_toast')
and not exists (
select 1 from pg_constraint con where con.conindid = i.indexrelid
)
and exists (
select 1
from pg_index i2
join pg_class ic2 on ic2.oid = i2.indexrelid
where i2.indrelid = i.indrelid
and i2.indkey = i.indkey
and i2.indclass = i.indclass
and i2.indcollation = i.indcollation
and i2.indpred is not distinct from i.indpred
and i2.indexprs is not distinct from i.indexprs
and i2.indexrelid <> i.indexrelid
and ic2.relname < ic.relname
)
order by 1, 2, 3
"""
return fmtRows(client.query(sql))
# 查看重复或冗余的索引
def get_redundant_indexes(args):
client, err = openClient(args)
if err:
return err
try:
rows = _redundantIndexes(client)
return mw.returnData(True, 'ok', rows)
finally:
client.close()
# 删除重复或冗余的索引
def redundant_indexes_cmd(args):
client, err = openClient(args)
if err:
return err
try:
rows = _redundantIndexes(client)
index = int(args['index'])
if index >= len(rows):
return mw.returnData(False, '索引不存在,请刷新后重试')
client.execute(rows[index]['sql_drop_index'])
return mw.returnData(True, '执行成功!')
finally:
client.close()
# 统计库里每个表的大小
def get_table_info(args):
client, err = openClient(args)
if err:
return err
try:
sql = """
select n.nspname as "TABLE_SCHEMA",
c.relname as "TABLE_NAME",
case c.relkind
when 'r' then 'table'
when 'p' then 'partitioned table'
when 'v' then 'view'
when 'm' then 'materialized view'
else c.relkind::text
end as "ENGINE",
c.reltuples as rows_estimate,
pg_relation_size(c.oid) as data_bytes,
pg_indexes_size(c.oid) as index_bytes,
pg_total_relation_size(c.oid) as total_bytes,
coalesce((
select string_agg(a.attname, ',' order by k.ord)
from pg_index i
join unnest(i.indkey) with ordinality as k(attnum, ord) on true
join pg_attribute a on a.attrelid = i.indrelid and a.attnum = k.attnum
where i.indrelid = c.oid and i.indisprimary
), '-') as "COLUMN_NAME",
coalesce((
select string_agg(format_type(a.atttypid, a.atttypmod), ',' order by k.ord)
from pg_index i
join unnest(i.indkey) with ordinality as k(attnum, ord) on true
join pg_attribute a on a.attrelid = i.indrelid and a.attnum = k.attnum
where i.indrelid = c.oid and i.indisprimary
), '-') as "COLUMN_TYPE"
from pg_class c
join pg_namespace n on n.oid = c.relnamespace
where c.relkind in ('r', 'p', 'v', 'm')
and n.nspname not in ('pg_catalog', 'information_schema', 'pg_toast')
and n.nspname not like 'pg_temp%'
order by total_bytes desc
"""
rows = client.query(sql)
for i in range(len(rows)):
row = rows[i]
row['DATA_LENGTH'] = round(float(row['data_bytes'] or 0) / 1024 / 1024 / 1024, 2)
row['INDEX_LENGTH'] = round(float(row['index_bytes'] or 0) / 1024 / 1024 / 1024, 2)
row['TOTAL_LENGTH'] = round(float(row['total_bytes'] or 0) / 1024 / 1024 / 1024, 2)
# PostgreSQL 没有 AUTO_INCREMENT,使用 SEQUENCE / IDENTITY
row['AUTO_INCREMENT'] = '-'
row['RESIDUAL_AUTO_INCREMENT'] = '使用 SEQUENCE/IDENTITY'
row['ROWS_ESTIMATE'] = int(row['rows_estimate'] or 0)
del row['data_bytes']
del row['index_bytes']
del row['total_bytes']
return mw.returnData(True, 'ok', fmtRows(rows))
finally:
client.close()
# 查看应用端IP连接数总和
def get_conn_count(args):
client, err = openClient(args)
if err:
return err
try:
sql = """
select usename as "user",
coalesce(datname, '空') as db,
coalesce(host(client_addr), '本地') as "Client_IP",
count(*) as count
from pg_stat_activity
where backend_type = 'client backend'
group by usename, datname, client_addr
order by count desc
"""
rows = fmtRows(client.query(sql))
return mw.returnData(True, 'ok', rows)
finally:
client.close()
# 快速找出没有主键的表
def get_fpk_info(args):
client, err = openClient(args)
if err:
return err
try:
sql = """
select n.nspname as table_schema, c.relname as table_name
from pg_class c
join pg_namespace n on n.oid = c.relnamespace
where c.relkind in ('r', 'p')
and n.nspname not in ('pg_catalog', 'information_schema', 'pg_toast')
and not exists (
select 1 from pg_index i
where i.indrelid = c.oid and i.indisprimary
)
order by n.nspname, c.relname
"""
rows = fmtRows(client.query(sql))
return mw.returnData(True, 'ok', rows)
finally:
client.close()
# 查看当前锁阻塞的SQL
def get_lock_sql(args):
client, err = openClient(args)
if err:
return err
try:
sql = """
select coalesce(a.backend_xid::text, '-') as trx_id,
'等待锁' as trx_state,
a.xact_start as trx_started,
a.pid as processlist_id,
a.query as info,
a.usename as "user",
coalesce(host(a.client_addr), '本地') as host,
a.datname as db,
coalesce(a.wait_event_type, '-') as command,
a.state,
'SELECT pg_cancel_backend(' || a.pid || ')' as sql_kill_blocking_query,
pg_blocking_pids(a.pid) as blocking_pids
from pg_stat_activity a
where cardinality(pg_blocking_pids(a.pid)) > 0
and a.backend_type = 'client backend'
order by a.xact_start
"""
rows = fmtRows(client.query(sql))
return mw.returnData(True, 'ok', rows)
finally:
client.close()
# 终止阻塞会话
def kill_lock_pid(args):
client, err = openClient(args)
if err:
return err
try:
pid = int(args['pid'])
data = client.one('select pg_terminate_backend(%s) as ok', (pid,))
if data is None or data['ok'] is not True:
return mw.returnData(False, '结束会话失败,请检查会话是否存在')
return mw.returnData(True, '执行成功!')
finally:
client.close()
# 终止所有阻塞会话
def kill_all_lock(args):
client, err = openClient(args)
if err:
return err
try:
sql = """
select distinct unnest(pg_blocking_pids(pid)) as pid
from pg_stat_activity
where cardinality(pg_blocking_pids(pid)) > 0
and backend_type = 'client backend'
"""
rows = client.query(sql)
count = 0
for x in rows:
data = client.one('select pg_terminate_backend(%s) as ok', (x['pid'],))
if data is not None and data['ok'] is True:
count += 1
return mw.returnData(True, '执行成功,已结束 %s 个阻塞会话' % count)
finally:
client.close()
# 查看死锁信息
def get_deadlock_info(args):
client, err = openClient(args)
if err:
return err
try:
deadlocks = client.one('select coalesce(sum(deadlocks), 0) as num from pg_stat_database')
locks = client.query("""
select pid, usename as "user", datname as db, state,
coalesce(wait_event_type, '-') as wait_event_type,
query
from pg_stat_activity
where cardinality(pg_blocking_pids(pid)) > 0
and backend_type = 'client backend'
""")
msg = 'PostgreSQL 不保存历史死锁明细,仅提供累计次数与当前锁等待。\n'
msg += '数据库累计死锁次数:%s\n' % deadlocks['num']
if len(locks) == 0:
msg += '当前没有处于锁等待的会话。'
else:
msg += '当前锁等待会话:\n'
for x in locks:
msg += 'pid=%s user=%s db=%s state=%s wait=%s\nquery=%s\n' % (
x['pid'], x['user'], x['db'], x['state'], x['wait_event_type'], x['query'])
return mw.returnData(True, 'ok', msg)
finally:
client.close()
# 查看主从复制信息
def get_slave_status(args):
client, err = openClient(args)
if err:
return err
try:
recovery = client.one('select pg_is_in_recovery() as recovery')['recovery']
if recovery is False:
reps = client.query("""
select client_addr, application_name, state, sync_state,
sent_lsn, write_lsn, flush_lsn, replay_lsn,
coalesce(replay_lag::text, '-') as replay_lag
from pg_stat_replication
""")
if len(reps) == 0:
return mw.returnData(True, 'ok', '未开启主从复制:当前为主库,且没有复制的从库连接。')
msg = '当前为主库,从库复制状态:\n'
for x in reps:
msg += '从库地址:%s 应用:%s\n' % (x['client_addr'], x['application_name'])
msg += '状态:%s 同步模式:%s\n' % (x['state'], x['sync_state'])
msg += 'sent_lsn=%s write_lsn=%s flush_lsn=%s replay_lsn=%s\n' % (
x['sent_lsn'], x['write_lsn'], x['flush_lsn'], x['replay_lsn'])
msg += 'replay_lag=%s\n\n' % x['replay_lag']
return mw.returnData(True, 'ok', msg)
# 当前为从库
lag = client.one("""
select coalesce(extract(epoch from (now() - pg_last_xact_replay_timestamp()))::int, 0) as lag
""")
lsn = client.one("""
select pg_last_wal_receive_lsn() as receive_lsn,
pg_last_wal_replay_lsn() as replay_lsn,
pg_last_xact_replay_timestamp() as replay_time
""")
msg = '当前为从库,复制状态:\n'
msg += 'receive_lsn=%s\n' % lsn['receive_lsn']
msg += 'replay_lsn=%s\n' % lsn['replay_lsn']
msg += '最近回放时间=%s\n' % lsn['replay_time']
msg += '延迟时间:%s 秒' % lag['lag']
return mw.returnData(True, 'ok', msg)
finally:
client.close()

View File

@@ -6,6 +6,7 @@
<div class="tabs-item" data-name="mongodb">Mongodb</div>
<div class="tabs-item" data-name="memcached">Memcached</div>
<div class="tabs-item" data-name="mysql">MySQL</div>
<div class="tabs-item" data-name="postgresql">PostgreSQL</div>
</div>
</div>
@@ -16,6 +17,99 @@
<div class="prompt_description">当前未安装本地服务器,<a class="btlink install_server" href="/soft/index">点击安装</a></div>
</div>
<!-- postgresql start -->
<div class="tab-con hide" id="postgresql" style="padding: 0px;">
<div class="col-md-12" style="padding: 0px;overflow: hidden;">
<div class="tootls_group tootls_top">
<div class="pull-left">
<div class="pgserver_list" style="float:left;">
<select name="sid" class="bt-input-text c5 mr5">
<option value="0">本地服务器</option>
</select>
</div>
<div class="postgresql_db_list" style="float:left;">
<select name="postgresql_db" class="bt-input-text c5 mr5">
<option value="0">数据库空</option>
</select>
</div>
<div class="postgresql_table_list" style="float:left;">
<select name="postgresql_table" class="bt-input-text c5 mr5">
<option value="0">数据表空</option>
</select>
</div>
<div class="field" style="float:left;">
<select name="postgresql_field_key" class="bt-input-text c5 mr5" style="width:80px;">
<option value="0">无字段</option>
</select>
</div>
<div class="value" style="float:left;">
<input name="postgresql_field_value" type="text" class="bt-input-text" placeholder="请输入查找内容">
</div>
<div style="float:left;">
<button id="postgresql_find" type="button" class="btn btn-success btn-sm mr5 ml5" >查找</button>
<button id="postgresql_common" type="button" class="btn btn-success btn-sm mr5 ml5">常用功能</button>
</div>
</div>
</div>
<div style="position: relative;">
<div id="postgresql_table" class="postgresql_table divtable mtb10">
<table class="table table-hover">
<thead style="position: relative;z-index: 1;">
<tr>
<th><span>编号</span></th>
<th><span>操作类型</span></th>
<th><span>详情</span></th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
<div class="postgresql_list_page page">
<div><span class="Pcurrent">0</span><span class="Pcount">共0条</span></div>
</div>
</div>
<hr style="border:none;" />
<div class="col-md-12" style="padding-left: 3px;">
<div id="postgresql_list_tab" style="padding-top:0px;">
<div class="tab-nav">
<span data-name="proccess" class="on">进程</span>
<span data-name="status" class="">状态</span>
<span data-name="stats" class="">统计</span>
</div>
</div>
<div style="position: relative;">
<div id="postgresql_ot_table" class="divtable">
<table class="table table-hover">
<thead style="position: relative;z-index: 1;">
<tr>
<th><span>编号</span></th>
<th><span>操作类型</span></th>
<th><span>详情</span></th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
</div>
</div>
<!-- postgresql end -->
<!-- mysql start -->
<!-- show w-full -->
<div class="tab-con hide" id="mysql" style="padding: 0px;">

View File

@@ -143,6 +143,60 @@ function myPostCBN(method, args, callback){
},'json');
}
function pgPostCB(method, args, callback){
var loadT = layer.msg('正在获取...', { icon: 16, time: 0, shade: 0.3 });
var req_data = {};
req_data['name'] = 'data_query';
req_data['func'] = method;
req_data['script']='sql_postgresql';
args['version'] = '';
if (typeof(args) == 'string' && args == ''){
req_data['args'] = JSON.stringify(toArrayObject(args));
} else {
req_data['args'] = JSON.stringify(args);
}
$.post('/plugins/callback', req_data, function(data) {
layer.close(loadT);
if (!data.status){
layer.msg(data.msg,{icon:0,time:2000,shade: [0.3, '#000']});
return;
}
if(typeof(callback) == 'function'){
callback(data);
}
},'json');
}
function pgPostCBN(method, args, callback){
var req_data = {};
req_data['name'] = 'data_query';
req_data['func'] = method;
req_data['script']='sql_postgresql';
args['version'] = '';
if (typeof(args) == 'string' && args == ''){
req_data['args'] = JSON.stringify(toArrayObject(args));
} else {
req_data['args'] = JSON.stringify(args);
}
$.post('/plugins/callback', req_data, function(data) {
if (!data.status){
layer.msg(data.msg,{icon:0,time:2000,shade: [0.3, '#000']});
return;
}
if(typeof(callback) == 'function'){
callback(data);
}
},'json');
}
function selectTab(tab = 'redis'){
$('.tab-view-box .tab-con').addClass('hide').removeClass('show').removeClass('w-full');
@@ -163,6 +217,7 @@ function initTabFunc(tab){
case 'mongodb':initTabMongodb();break;
case 'memcached':initTabMemcached();break;
case 'mysql':initTabMySQL();break;
case 'postgresql':initTabPostgresql();break;
case 'default:':initTabRedis();break;
}
}
@@ -237,7 +292,7 @@ function initTabMemcached(){
$('#memcached_clear_all').unbind('click').click(function(){
var sid = memcachedGetSid();
memPostCB('clear',{'sid':sid} ,function(rdata){
// console.log(rdata);
console.log("xxx",rdata);
showMsg(rdata.data.msg,function(){
if (rdata.data.status){
memcachedGetList();
@@ -927,6 +982,7 @@ function mysqlInitField(f, data){
function mysqlGetServerList(call_func){
closeInstallLayer();
myPostCBN('get_server_list', {}, function(rdata){
var rdata = rdata.data;
if (rdata.data.length != 0){
@@ -951,7 +1007,10 @@ function mysqlGetServerList(call_func){
}
closeInstallLayer();
} else {
showInstallLayer();
layer.msg(rdata.data.msg,{ icon: 7, time: 2000, shade: 0.3 });
setTimeout(function(){
showInstallLayer();
},2050);
}
});
}
@@ -1201,9 +1260,9 @@ function memcachedGetItem(){
function memcachedGetList(){
var sid = memcachedGetSid();
closeInstallLayer();
memPostCB('get_items',{'sid':sid} ,function(rdata){
if (rdata.data.status){
var items = rdata.data.data['items'];
var content = '';
for (var i = 0; i < items.length; i++) {
@@ -1219,10 +1278,14 @@ function memcachedGetList(){
memcachedGetKeyList(1);
});
closeInstallLayer();
memcachedGetKeyList(1);
} else {
showInstallLayer();
layer.msg(rdata.data.msg,{ icon: 7, time: 2000, shade: 0.3 });
setTimeout(function(){
showInstallLayer();
},2050);
}
memcachedGetKeyList(1);
});
}
@@ -1386,7 +1449,6 @@ function mongodbInitField(f, data){
var mogodb_db_list;
function mongodbCollectionName(){
// console.log(mogodb_db_list);
var v = mogodb_db_list.getValue('value');
if (v.length == 0){
// console.log($('#mongodb').data('collection'));
@@ -1397,6 +1459,7 @@ function mongodbCollectionName(){
function mongodbGetList(){
var sid = mongodbGetSid();
closeInstallLayer();
mgdbPostCB('get_db_list',{'sid':sid} ,function(rdata){
// console.log(rdata);
if (rdata.data.status){
@@ -1423,7 +1486,11 @@ function mongodbGetList(){
closeInstallLayer();
} else {
showInstallLayer();
layer.msg(rdata.data.msg,{ icon: 7, time: 2000, shade: 0.3 });
setTimeout(function(){
showInstallLayer();
},2050);
}
});
}
@@ -1606,6 +1673,7 @@ function redisGetIdx(){
function redisGetList(){
var sid = redisGetSid();
closeInstallLayer();
redisPostCB('get_list',{'sid':sid} ,function(rdata){
if (rdata.data.status){
var list = rdata.data.data;
@@ -1627,7 +1695,10 @@ function redisGetList(){
redisGetKeyList(1);
closeInstallLayer();
} else {
showInstallLayer();
layer.msg(rdata.data.msg,{ icon: 7, time: 1000, shade: 0.3 });
setTimeout(function(){
showInstallLayer();
},1050);
}
});
}
@@ -1936,3 +2007,663 @@ function redisBatchClear(){
}
// ------------------------- redis end ---------------------------------
// ------------------------- postgresql start -------------------------------
var pg_timer = null;
var pg_last_error = '';
function pgToastError(msg){
// 轮询失败时避免每 2 秒重复弹出相同的提示
if (!msg || pg_last_error == msg){
return;
}
pg_last_error = msg;
layer.msg(msg,{icon:7,time:2500});
}
function pgHtml(v){
if (v === null || v === undefined){
return '';
}
return String(v).replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;').replace(/"/g,'&quot;');
}
function pgGetSid(){
return $('#postgresql select[name=sid]').val();
}
function pgGetDbName(){
return $('#postgresql .postgresql_db_list select[name=postgresql_db]').val();
}
function pgGetTableName(){
var table = $('#postgresql .postgresql_table_list select[name=postgresql_table]').val();
if (!table || table == '0'){
return '';
}
return table;
}
function pgShowNotice(title, msg){
layer.open({
type: 1,
title: title,
area: ['560px', '260px'],
closeBtn: 1,
shadeClose: false,
content: '<div class="bt-form pd20"><pre style="white-space:pre-wrap;word-break:break-all;margin:0;line-height:1.8;">'+pgHtml(msg)+'</pre></div>'
});
}
function pgModalTable(title, list, width, height){
if (!list || list.length == 0){
layer.msg('暂无数据',{icon:7});
return;
}
var fields = mongodbGetDataFields(list);
var thead = '';
for (var i = 0; i < fields.length; i++){
thead += '<th>'+pgHtml(fields[i])+'</th>';
}
var tbody = '';
for (var i = 0; i < list.length; i++){
tbody += '<tr>';
for (var j = 0; j < fields.length; j++){
var f = fields[j];
var val = (f in list[i]) ? list[i][f] : '';
tbody += '<td title="'+pgHtml(val)+'">'+pgHtml(val)+'</td>';
}
tbody += '</tr>';
}
layer.open({
type: 1,
title: title,
area: [width || '900px', height || '420px'],
closeBtn: 1,
shadeClose: false,
content: '<div class="bt-form pd20 divtable taskdivtable" style="height:'+(parseInt(height || '420') - 80)+'px;overflow:auto;">\
<table class="table table-hover">\
<thead><tr>'+thead+'</tr></thead>\
<tbody>'+tbody+'</tbody>\
</table>\
</div>'
});
}
function pgInitField(f, data){
var option_html = '<option value="0">无字段</option>';
for (var i = 0; i < f.length; i++){
if (data['soso_field'] == f[i]){
option_html += '<option value="'+pgHtml(f[i])+'" selected>'+pgHtml(f[i])+'</option>';
} else {
option_html += '<option value="'+pgHtml(f[i])+'">'+pgHtml(f[i])+'</option>';
}
}
$('#postgresql select[name="postgresql_field_key"]').html(option_html);
}
function initTabPostgresql(){
clearInterval(pg_timer);
pg_last_error = '';
pgGetServerList(function(){
pgGetDbList();
pgProcessList();
clearInterval(pg_timer);
pg_timer = setInterval(function(){
var name = $('#postgresql_list_tab .tab-nav span.on').data('name');
pgRunPgTab(name);
var fname = $('#cutTab .tabs-item.active').data('name');
if (fname != 'postgresql'){
clearInterval(pg_timer);
}
}, 2000);
});
$('#postgresql_list_tab .tab-nav span').unbind('click').click(function(){
$('#postgresql_list_tab .tab-nav span').removeClass('on');
$(this).addClass('on');
var name = $(this).data('name');
pgRunPgTab(name);
});
$('#postgresql_find').unbind('click').click(function(){
var val = $('#postgresql input[name="postgresql_field_value"]').val();
if (val == ''){
layer.msg('搜索不能为空!',{icon:7});
return;
}
pgGetDataList(1);
});
pgCommonFunc();
}
function pgRunPgTab(name){
switch(name){
case 'proccess':pgProcessList();break;
case 'status':pgStatusList();break;
case 'stats':pgStatsList();break;
}
}
function pgGetServerList(call_func){
closeInstallLayer();
pgPostCBN('get_server_list', {}, function(rdata){
var data = rdata.data;
if (data.data && data.data.length != 0){
var items = data.data;
var content = '';
for (var i = 0; i < items.length; i++){
var t = items[i];
if (i == 0){
content += '<option value="'+t['val']+'" selected>'+t['name']+'</option>';
} else {
content += '<option value="'+t['val']+'">'+t['name']+'</option>';
}
}
$('#postgresql select[name=sid]').html(content);
$('#postgresql select[name=sid]').change(function(){
pgGetDbList();
});
if (typeof(call_func) == 'function'){
call_func();
}
closeInstallLayer();
} else {
layer.msg('当前未安装 PostgreSQL',{icon:7,time:2000,shade:0.3});
setTimeout(function(){
showInstallLayer();
},2050);
}
});
}
function pgGetDbList(){
var sid = pgGetSid();
pgPostCBN('get_db_list',{'sid':sid}, function(rdata){
var data = rdata.data;
if (!data.status){
layer.msg(data.msg,{icon:7,time:2500});
return;
}
var items = data.data['list'];
if (items.length == 0){
$('#postgresql .postgresql_db_list select[name=postgresql_db]').html('<option value="0">数据库空</option>');
$('#postgresql .postgresql_table_list select[name=postgresql_table]').html('<option value="0">数据表空</option>');
$('#postgresql_table thead tr').html('');
$('#postgresql_table tbody').html('');
$('.postgresql_list_page').html('<div><span class="Pcurrent">0</span><span class="Pcount">共0条</span></div>');
return;
}
var content = '';
for (var i = 0; i < items.length; i++){
var name = items[i];
if (i == 0){
content += '<option value="'+pgHtml(name)+'" selected>database['+pgHtml(name)+']</option>';
} else {
content += '<option value="'+pgHtml(name)+'">database['+pgHtml(name)+']</option>';
}
}
$('#postgresql .postgresql_db_list select[name=postgresql_db]').html(content);
$('#postgresql .postgresql_db_list select[name=postgresql_db]').change(function(){
pgGetTableList(1);
});
pgGetTableList(1);
});
}
function pgGetTableList(p){
var sid = pgGetSid();
var db = pgGetDbName();
if (!db || db == '0'){
return;
}
pgPostCBN('get_table_list',{'sid':sid,'db':db}, function(rdata){
var data = rdata.data;
if (!data.status){
layer.msg(data.msg,{icon:7,time:2500});
return;
}
var items = data.data['list'];
if (items.length == 0){
$('#postgresql .postgresql_table_list select[name=postgresql_table]').html('<option value="0">数据表空</option>');
$('#postgresql_table thead tr').html('');
$('#postgresql_table tbody').html('');
$('.postgresql_list_page').html('<div><span class="Pcurrent">0</span><span class="Pcount">共0条</span></div>');
return;
}
var content = '';
for (var i = 0; i < items.length; i++){
var name = items[i];
if (i == 0){
content += '<option value="'+pgHtml(name)+'" selected>table['+pgHtml(name)+']</option>';
} else {
content += '<option value="'+pgHtml(name)+'">table['+pgHtml(name)+']</option>';
}
}
$('#postgresql .postgresql_table_list select[name=postgresql_table]').html(content);
$('#postgresql .postgresql_table_list select[name=postgresql_table]').change(function(){
pgGetDataList(1);
});
pgGetDataList(1);
});
}
function pgGetDataList(p){
var sid = pgGetSid();
var db = pgGetDbName();
var table = pgGetTableName();
var pg_field = $('#postgresql select[name="postgresql_field_key"]').val();
var pg_value = $('#postgresql input[name="postgresql_field_value"]').val();
var request_data = {
'sid': sid,
'db': db,
'table': table,
'p': p,
'size': 10
};
if (pg_field != '0' && pg_field){
request_data['where'] = {field: pg_field, value: pg_value};
} else {
request_data['where'] = {};
}
pgPostCB('get_data_list', request_data, function(rdata){
var data = rdata.data;
if (!data.status){
layer.msg(data.msg,{icon:7,time:2500});
return;
}
var rdata2 = data.data;
var dlist = rdata2['list'];
var fields = mongodbGetDataFields(dlist);
if (fields.length != 0){
pgInitField(fields, rdata2);
}
var header_field = '';
for (var i = 0; i < fields.length; i++){
header_field += '<th>'+pgHtml(fields[i])+'</th>';
}
$('#postgresql_table thead tr').html(header_field);
var tbody = '';
for (var i = 0; i < dlist.length; i++){
tbody += '<tr>';
for (var j = 0; j < fields.length; j++){
var f = fields[j];
var val = (f in dlist[i]) ? dlist[i][f] : '';
tbody += '<td title="'+pgHtml(val)+'">'+pgHtml(val)+'</td>';
}
tbody += '</tr>';
}
$('#postgresql_table tbody').html(tbody);
$('#postgresql .postgresql_list_page').html(rdata2['page']);
});
}
function pgRenderOtTable(dlist){
var fields = mongodbGetDataFields(dlist);
var header_field = '';
for (var i = 0; i < fields.length; i++){
header_field += '<th>'+pgHtml(fields[i])+'</th>';
}
$('#postgresql_ot_table thead tr').html(header_field);
var tbody = '';
for (var i = 0; i < dlist.length; i++){
tbody += '<tr>';
for (var j = 0; j < fields.length; j++){
var f = fields[j];
var val = (f in dlist[i]) ? dlist[i][f] : '';
tbody += '<td title="'+pgHtml(val)+'">'+pgHtml(val)+'</td>';
}
tbody += '</tr>';
}
$('#postgresql_ot_table tbody').html(tbody);
}
function pgProcessList(){
pgPostCBN('get_proccess_list',{'sid':pgGetSid()}, function(rdata){
var data = rdata.data;
if (!data.status){
pgToastError(data.msg);
return;
}
pg_last_error = '';
pgRenderOtTable(data.data['list']);
});
}
function pgStatusList(){
pgPostCBN('get_status_list',{'sid':pgGetSid()}, function(rdata){
var data = rdata.data;
if (!data.status){
pgToastError(data.msg);
return;
}
pg_last_error = '';
pgRenderOtTable(data.data['list']);
});
}
function pgStatsList(){
pgPostCBN('get_stats_list',{'sid':pgGetSid()}, function(rdata){
var data = rdata.data;
if (!data.status){
pgToastError(data.msg);
return;
}
pg_last_error = '';
pgRenderOtTable(data.data['list']);
});
}
function pgCommonFunc(){
$('#postgresql_common').unbind('click').click(function(){
layer.open({
type: 1,
title: "PostgreSQL常用功能",
area: ['600px', '200px'],
closeBtn: 1,
shadeClose: false,
content: '<div class="bt-form pd20">\
<button style="margin-bottom: 8px;" id="pg_top_nsql" type="button" class="btn btn-default btn-sm">查询执行次数最频繁的前N条SQL语句</button>\
<button style="margin-bottom: 8px;" id="pg_net_stat" type="button" class="btn btn-default btn-sm">PostgreSQL服务器的QPS/TPS指标</button>\
<button style="margin-bottom: 8px;" id="pg_redundant_indexes" type="button" class="btn btn-default btn-sm">查看重复或冗余的索引</button>\
<button style="margin-bottom: 8px;" id="pg_table_info" type="button" class="btn btn-default btn-sm">统计库里每个表的大小</button>\
<button style="margin-bottom: 8px;" id="pg_conn_count" type="button" class="btn btn-default btn-sm">查看应用端IP连接数总和</button>\
<button style="margin-bottom: 8px;" id="pg_fpk_info" type="button" class="btn btn-default btn-sm">快速找出没有主键的表</button>\
<button style="margin-bottom: 8px;" id="pg_lock_sql" type="button" class="btn btn-default btn-sm">查看当前锁阻塞的SQL</button>\
<button style="margin-bottom: 8px;" id="pg_deadlock_info" type="button" class="btn btn-default btn-sm">查看死锁信息</button>\
<button style="margin-bottom: 8px;" id="pg_slave_status" type="button" class="btn btn-default btn-sm">查看主从复制信息</button>\
</div>',
success:function(i,l){
$('#pg_top_nsql').click(function(){ pgCommonFuncTopN(); });
$('#pg_net_stat').click(function(){ pgCommonFuncNet(); });
$('#pg_redundant_indexes').click(function(){ pgCommonFuncRedundantIndexes(); });
$('#pg_table_info').click(function(){ pgCommonFuncTableInfo(); });
$('#pg_conn_count').click(function(){ pgCommonFuncConnCount(); });
$('#pg_fpk_info').click(function(){ pgCommonFuncFpkInfo(); });
$('#pg_lock_sql').click(function(){ pgCommonFuncLockSQL(); });
$('#pg_deadlock_info').click(function(){ pgCommonFuncDeadlockInfo(); });
$('#pg_slave_status').click(function(){ pgCommonFuncSlaveStatus(); });
}
});
});
}
function pgCommonFuncTopN(){
pgPostCBN('get_topn_list',{'sid':pgGetSid()}, function(rdata){
var data = rdata.data;
if (!data.status){
pgShowNotice('查询执行次数最频繁的前N条SQL语句', data.msg);
return;
}
pgModalTable('查询执行次数最频繁的前N条SQL语句', data.data, '1000px', '450px');
});
}
function pgCommonFuncNet(){
pgPostCBN('get_net_list',{'sid':pgGetSid()}, function(rdata){
var data = rdata.data;
if (!data.status){
pgShowNotice('PostgreSQL服务器的QPS/TPS指标', data.msg);
return;
}
pgModalTable('PostgreSQL服务器的QPS/TPS指标(网络带宽需在系统层监控)', data.data, '1000px', '360px');
});
}
function pgCommonFuncRedundantIndexes(){
function renderList(){
pgPostCBN('get_redundant_indexes',{'sid':pgGetSid()}, function(rdata){
var data = rdata.data;
if (!data.status){
layer.msg(data.msg,{icon:7,time:2500});
return;
}
var items = data.data;
if (items.length == 0){
layer.msg('没有发现重复或冗余的索引',{icon:7});
return;
}
var tbody = '';
for (var i = 0; i < items.length; i++){
tbody += '<tr>\
<td>'+pgHtml(items[i]['table_schema'])+'</td>\
<td>'+pgHtml(items[i]['table_name'])+'</td>\
<td>'+pgHtml(items[i]['redundant_index_name'])+'</td>\
<td>'+pgHtml(items[i]['redundant_index_columns'])+'</td>\
<td><a class="pg_drop_index btlink" index="'+i+'">删除</a></td>\
</tr>';
}
layer.open({
type: 1,
title: "查看重复或冗余的索引",
area: ['1000px', '420px'],
closeBtn: 1,
shadeClose: false,
content: '<div class="bt-form pd20 divtable taskdivtable">\
<table class="table table-hover" id="pg_redundant_table">\
<thead><tr>\
<th>库名</th><th>表名</th><th>冗余索引</th><th>字段</th><th>操作</th>\
</tr></thead>\
<tbody>'+tbody+'</tbody>\
</table>\
</div>',
success: function(){
$('#pg_redundant_table .pg_drop_index').click(function(){
var index = $(this).attr('index');
layer.confirm('确定删除索引 '+pgHtml(items[index]['redundant_index_name'])+' ?', {btn:['确定','取消']}, function(li){
pgPostCB('redundant_indexes_cmd', {'sid':pgGetSid(),'index':index}, function(r2){
var d = r2.data;
showMsg(d.msg,function(){
if (d.status){
layer.close(li);
renderList();
}
},{icon: d.status ? 1 : 2}, 2000);
});
});
});
}
});
});
}
renderList();
}
function pgCommonFuncTableInfo(){
pgPostCBN('get_table_info',{'sid':pgGetSid()}, function(rdata){
var data = rdata.data;
if (!data.status){
pgShowNotice('统计库里每个表的大小(单位 GB)', data.msg);
return;
}
pgModalTable('统计库里每个表的大小(单位 GB)', data.data, '1200px', '460px');
});
}
function pgCommonFuncConnCount(){
pgPostCBN('get_conn_count',{'sid':pgGetSid()}, function(rdata){
var data = rdata.data;
if (!data.status){
pgShowNotice('查看应用端IP连接数总和', data.msg);
return;
}
pgModalTable('查看应用端IP连接数总和', data.data, '700px', '420px');
});
}
function pgCommonFuncFpkInfo(){
pgPostCBN('get_fpk_info',{'sid':pgGetSid()}, function(rdata){
var data = rdata.data;
if (!data.status){
layer.msg(data.msg,{icon:7,time:2500});
return;
}
pgModalTable('快速找出没有主键的表', data.data, '800px', '400px');
});
}
function pgCommonFuncLockSQL(){
function renderSQL(){
pgPostCBN('get_lock_sql',{'sid':pgGetSid()}, function(rdata){
var data = rdata.data;
if (!data.status){
layer.msg(data.msg,{icon:7,time:2500});
return;
}
var items = data.data;
var tbody = '';
for (var i = 0; i < items.length; i++){
var t = '<tr>';
t += '<td>'+pgHtml(items[i]['trx_id'])+'</td>';
t += '<td>'+pgHtml(items[i]['trx_state'])+'</td>';
t += '<td>'+pgHtml(items[i]['trx_started'])+'</td>';
t += '<td>'+pgHtml(items[i]['processlist_id'])+'</td>';
t += '<td title="'+pgHtml(items[i]['info'])+'">'+pgHtml(items[i]['info'])+'</td>';
t += '<td>'+pgHtml(items[i]['user'])+'</td>';
t += '<td>'+pgHtml(items[i]['host'])+'</td>';
t += '<td>'+pgHtml(items[i]['db'])+'</td>';
t += '<td>'+pgHtml(items[i]['command'])+'</td>';
t += '<td>'+pgHtml(items[i]['state'])+'</td>';
t += '<td>'+pgHtml(items[i]['sql_kill_blocking_query'])+'</td>';
t += '<td><a class="exec btlink" index="'+i+'">执行</a></td>';
t += '</tr>';
tbody += t;
}
$('#pg_lock_table tbody').html(tbody);
$('#pg_lock_table tbody .exec').click(function(){
var index = $(this).attr('index');
var pid = items[index]['processlist_id'];
pgPostCB('kill_lock_pid', {'sid':pgGetSid(),'pid':pid}, function(r2){
var d = r2.data;
showMsg(d.msg,function(){
if (d.status){
renderSQL();
}
},{icon: d.status ? 1 : 2}, 2000);
});
});
});
}
layer.open({
type: 1,
title: "查看当前锁阻塞的SQL",
area: ['1100px', '420px'],
closeBtn: 1,
shadeClose: false,
content: '<div class="bt-form pd20 divtable taskdivtable">\
<div class="mr20 pull-left" style="border-right: 1px solid #ccc; padding-right: 20px;">\
<button id="pg_kill_all" type="button" class="btn btn-default btn-sm">关闭所有阻塞</button>\
</div>\
<hr />\
<table class="table table-hover" id="pg_lock_table">\
<thead><tr>\
<th>事务ID</th><th>事务状态</th><th>执行时间</th><th>线程ID</th>\
<th>Info</th><th>user</th><th>host</th><th>db</th>\
<th>command</th><th>state</th><th>kill</th><th>操作</th>\
</tr></thead>\
<tbody></tbody>\
</table>\
</div>',
success:function(){
renderSQL();
$('#pg_kill_all').unbind('click').click(function(){
pgPostCB('kill_all_lock', {'sid':pgGetSid()}, function(r2){
var d = r2.data;
showMsg(d.msg,function(){
if (d.status){
renderSQL();
}
},{icon: d.status ? 1 : 2}, 2000);
});
});
}
});
}
function pgCommonFuncDeadlockInfo(){
function renderText(){
pgPostCBN('get_deadlock_info',{'sid':pgGetSid()}, function(rdata){
var data = rdata.data;
if (!data.status){
layer.msg(data.msg,{icon:7,time:2500});
return;
}
$('#pg_info_log').val(data.data);
});
}
layer.open({
type: 1,
title: "查看死锁信息",
area: ['800px', '400px'],
closeBtn: 1,
shadeClose: false,
content: '<div class="bt-form pd15">\
<textarea readonly="" style="margin: 0px;height: 330px;width: 100%;background-color: #333;color:#fff; padding:0 5px" id="pg_info_log"></textarea>\
</div>',
success:function(){
renderText();
}
});
}
function pgCommonFuncSlaveStatus(){
function renderText(){
pgPostCBN('get_slave_status',{'sid':pgGetSid()}, function(rdata){
var data = rdata.data;
if (!data.status){
layer.msg(data.msg,{icon:7,time:2500});
return;
}
$('#pg_info_log').val(data.data);
});
}
layer.open({
type: 1,
title: "查看主从复制信息",
area: ['800px', '400px'],
closeBtn: 1,
shadeClose: false,
content: '<div class="bt-form pd15">\
<textarea readonly="" style="margin: 0px;height: 330px;width: 100%;background-color: #333;color:#fff; padding:0 5px" id="pg_info_log"></textarea>\
</div>',
success:function(){
renderText();
}
});
}
// ------------------------- postgresql end ---------------------------------

View File

@@ -13,7 +13,7 @@ serverPath=$(dirname "$rootPath")
VERSION=$2
if [ -f ${rootPath}/bin/activate ];then
source ${rootPath}/bin/activate
. ${rootPath}/bin/activate
fi
# {
@@ -40,7 +40,7 @@ fi
Install_Docker()
{
# which docker
# if [ "$?" == "0" ];then
# if [ "$?" = "0" ];then
# echo '安装已经完成docker'
# exit 0
# fi
@@ -69,7 +69,7 @@ Uninstall_Docker()
{
CMD=yum
which apt
if [ "$?" == "0" ];then
if [ "$?" = "0" ];then
CMD=apt
fi
@@ -97,7 +97,7 @@ Uninstall_Docker()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_Docker
else
Uninstall_Docker

View File

@@ -135,9 +135,6 @@ def initDreplace():
return ''
def appOp(method):
initDreplace()
if not mw.isAppleSystem():

View File

@@ -2,7 +2,7 @@
"ps": "DNS over HTTPS(DoH)是一种通过HTTPS协议加密域名解析请求的技术!",
"name": "doh",
"title": "DoH",
"versions": ["0.9.15"],
"versions": ["0.9.15","0.10.0"],
"tip": "soft",
"install_pre_inspection":false,
"uninstall_pre_inspection":true,

View File

@@ -9,9 +9,9 @@ Type=simple
User=www
Group=www
WorkingDirectory={$SERVER_PATH}/doh
# /www/server/doh/doh-proxy -u 127.0.0.1:53 -l 127.0.0.1:3000
# /www/server/doh/doh-proxy -u 127.0.0.1:53 -l 127.0.0.1:3198
# /www/server/doh/doh-proxy -h
ExecStart={$SERVER_PATH}/doh/doh-proxy -u 127.0.0.1:53 -l 127.0.0.1:3000
ExecStart={$SERVER_PATH}/doh/doh-proxy -u 127.0.0.1:53 -l 127.0.0.1:3198
Restart=always
RemainAfterExit=yes
#AmbientCapabilities=CAP_NET_BIND_SERVICE

View File

@@ -8,7 +8,7 @@ rootPath=$(dirname "$rootPath")
serverPath=$(dirname "$rootPath")
if [ -f ${rootPath}/bin/activate ];then
source ${rootPath}/bin/activate
. ${rootPath}/bin/activate
fi
@@ -43,7 +43,7 @@ Install_App()
echo '正在安装脚本文件...'
version=$1
if [ "macos" == "$OSNAME" ];then
if [ "macos" = "$OSNAME" ];then
echo "not support!"
exit
else
@@ -59,22 +59,16 @@ Install_App()
if [ -f $serverPath/source/doh/$file_xz ];then
cd $serverPath/source/doh && tar -xjf $file_xz
fi
echo "mv $serverPath/source/doh/doh-proxy $serverPath/doh"
if [ -f $serverPath/source/doh/doh-proxy ];then
echo "mv $serverPath/source/doh/doh-proxy $serverPath/doh"
mv $serverPath/source/doh/doh-proxy $serverPath/doh
fi
if [ -d $serverPath/doh ];then
echo $version > $serverPath/doh/version.pl
cd ${rootPath} && python3 plugins/doh/index.py start
cd ${rootPath} && python3 plugins/doh/index.py initd_install
fi
echo $version > $serverPath/doh/version.pl
echo 'install doh success'
}
@@ -95,7 +89,7 @@ Uninstall_App()
action=$1
version=$2
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_App $version
else
Uninstall_App $version

View File

@@ -13,13 +13,13 @@ serverPath=$(dirname "$rootPath")
VERSION=$2
if [ -f ${rootPath}/bin/activate ];then
source ${rootPath}/bin/activate
. ${rootPath}/bin/activate
fi
OSNAME=`bash ${rootPath}/scripts/getos.sh`
if [ "" == "$OSNAME" ];then
if [ "" = "$OSNAME" ];then
OSNAME=`cat ${rootPath}/data/osname.pl`
fi
@@ -83,7 +83,7 @@ Uninstall_App()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_App
else
Uninstall_App

View File

@@ -106,7 +106,7 @@ def getPidFile():
return tmp.groups()[0].strip()
def status():
cmd = "ps aux|grep dztasks|grep -v grep|grep -v python|grep -v mdserver-web|awk '{print $2}'"
cmd = "ps -ef|grep dztasks|grep -v grep|grep -v python|grep -v mdserver-web|awk '{print $2}'"
data = mw.execShell(cmd)
if data[0] == '':
return 'stop'

View File

@@ -14,16 +14,16 @@ sysArch=`arch`
sysName=`uname`
DZ_ARCH_NAME=amd64
if [ "$sysArch" == "arm64" ];then
if [ "$sysArch" = "arm64" ];then
DZ_ARCH_NAME=arm64
elif [ "$sysArch" == "x86_64" ]; then
elif [ "$sysArch" = "x86_64" ]; then
DZ_ARCH_NAME=amd64
elif [ "$sysArch" == "aarch64" ]; then
elif [ "$sysArch" = "aarch64" ]; then
DZ_ARCH_NAME=aarch64
fi
DZ_NAME=linux
if [ "$sysName" == "Darwin" ];then
if [ "$sysName" = "Darwin" ];then
DZ_NAME=darwin
fi
Install_App()
@@ -78,7 +78,7 @@ Uninstall_App()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_App
else
Uninstall_App

View File

@@ -328,7 +328,7 @@ def setBlackIp():
mw.execShell('fail2ban-client -vvv set {jail} unbanip {ip}'.format(jail=d, ip=ip))
mw.writeFile(getBlackFile(), json.dumps([]))
return nw.returnJson(True, "禁止IP成功")
return mw.returnJson(True, "禁止IP成功")
# 检查IP格式
for ip in add_ip_list:

View File

@@ -67,7 +67,7 @@ Uninstall_App()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_App
else
Uninstall_App

View File

@@ -3,9 +3,9 @@ PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
function version_gt() { test "$(echo "$@" | tr " " "\n" | sort -V | head -n 1)" != "$1"; }
function version_le() { test "$(echo "$@" | tr " " "\n" | sort -V | head -n 1)" == "$1"; }
function version_le() { test "$(echo "$@" | tr " " "\n" | sort -V | head -n 1)" = "$1"; }
function version_lt() { test "$(echo "$@" | tr " " "\n" | sort -rV | head -n 1)" != "$1"; }
function version_ge() { test "$(echo "$@" | tr " " "\n" | sort -rV | head -n 1)" == "$1"; }
function version_ge() { test "$(echo "$@" | tr " " "\n" | sort -rV | head -n 1)" = "$1"; }
# cd /www/server/mdserver-web/plugins/gdrive && /bin/bash install.sh install 2.0
@@ -22,7 +22,7 @@ PATH=$PATH:${rootPath}/bin
export PATH
# if [ -f ${rootPath}/bin/activate ];then
# source ${rootPath}/bin/activate
# . ${rootPath}/bin/activate
# fi
VERSION=$2
@@ -43,9 +43,9 @@ Install_App()
echo "python3 < 3.10"
cd ${GDDIR} && python3 -m venv .
fi
cd ${GDDIR} && source ${GDDIR}/bin/activate
cd ${GDDIR} && . ${GDDIR}/bin/activate
else
cd ${GDDIR} && source ${GDDIR}/bin/activate
cd ${GDDIR} && . ${GDDIR}/bin/activate
fi
tmp=`python3 -V 2>&1|awk '{print $2}'`
@@ -101,7 +101,7 @@ action=$1
type=$2
echo $action $type
if [ "${action}" == 'install' ];then
if [ "${action}" = 'install' ];then
Install_App
else
Uninstall_App

View File

@@ -2,7 +2,7 @@
"ps": "Gitea是一个开源社区驱动的轻量级代码托管解决方案。",
"name": "gitea",
"title": "Gitea",
"versions": ["1.17.2","1.18.5","1.22.1","1.24.3"],
"versions": ["1.17.2","1.18.5","1.22.1","1.24.3","1.25.3"],
"tip": "soft",
"install_pre_inspection":false,
"uninstall_pre_inspection":true,

View File

@@ -2,16 +2,22 @@
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
# cd /www/server/mdserver-web/plugins/gitea && bash install.sh upgrade 1.25.3
action=$1
version=$2
curPath=`pwd`
rootPath=$(dirname "$curPath")
rootPath=$(dirname "$rootPath")
serverPath=$(dirname "$rootPath")
if [ -f ${rootPath}/bin/activate ];then
source ${rootPath}/bin/activate
. ${rootPath}/bin/activate
fi
URL_DOWNLOAD=https://dl.gitea.com
@@ -25,11 +31,11 @@ getBit(){
}
Install_Rsync(){
if [ "$OSNAME" == "debian" ] || [ "$OSNAME" == "ubuntu" ];then
if [ "$OSNAME" = "debian" ] || [ "$OSNAME" = "ubuntu" ];then
apt install -y rsync
elif [[ "$OSNAME" == "arch" ]]; then
elif [[ "$OSNAME" = "arch" ]]; then
echo y | pacman -Sy rsync
elif [[ "$OSNAME" == "macos" ]]; then
elif [[ "$OSNAME" = "macos" ]]; then
# brew install rsync
# brew install lsyncd
echo "ok"
@@ -66,7 +72,7 @@ Install_App()
git config --global push.default simple
if [ "macos" == "$OSNAME" ];then
if [ "macos" = "$OSNAME" ];then
file=gitea-${version}-darwin-10.12-amd64
else
file=gitea-${version}-linux-amd64
@@ -87,20 +93,21 @@ Install_App()
chown -R www:www $serverPath/gitea
fi
if [ -d $serverPath/gitea ];then
echo $version > $serverPath/gitea/version.pl
if [ -d $serverPath/gitea ] && [ "${action}" = 'install' ] ;then
cd ${rootPath} && python3 plugins/gitea/index.py start
cd ${rootPath} && python3 plugins/gitea/index.py initd_install
fi
echo $version > $serverPath/gitea/version.pl
echo 'install success'
if [ "$action" = "upgrade" ];then
which systemctl && systemctl restart gitea
fi
}
Uninstall_App()
{
if [ -f /usr/lib/systemd/system/gitea.service ];then
systemctl stop gitea
systemctl disable gitea
@@ -116,11 +123,10 @@ Uninstall_App()
echo 'uninstall success'
}
action=$1
version=$2
if [ "${1}" == 'install' ];then
if [ "${action}" = 'install' ] || [ "$action" = "upgrade" ];then
Install_App $version
else
elif [ "${action}" = 'uninstall' ];then
Uninstall_App $version
else
echo "OPTIONS ERROR"
fi

View File

@@ -8,7 +8,7 @@ rootPath=$(dirname "$rootPath")
serverPath=$(dirname "$rootPath")
if [ -f ${rootPath}/bin/activate ];then
source ${rootPath}/bin/activate
. ${rootPath}/bin/activate
fi
@@ -16,7 +16,7 @@ GOGS_DOWNLOAD='https://dl.gogs.io'
getOs(){
os=`uname`
if [ "Darwin" == "$os" ];then
if [ "Darwin" = "$os" ];then
echo 'darwin'
else
echo 'linux'
@@ -48,7 +48,7 @@ Install_gogs()
git config --global push.default simple
if [ "darwin" == "$os" ];then
if [ "darwin" = "$os" ];then
file=gogs_${version}_darwin_amd64.zip
else
file=gogs_${version}_linux_amd64.zip
@@ -100,7 +100,7 @@ Uninstall_gogs()
action=$1
version=$2
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_gogs $version
else
Uninstall_gogs $version

View File

@@ -113,7 +113,7 @@ def status():
# if not os.path.exists(pid_file):
# return 'stop'
cmd = "ps aux|grep gorse |grep -v grep | grep -v python | grep -v mdserver-web | awk '{print $2}'"
cmd = "ps -ef|grep gorse |grep -v grep | grep -v python | grep -v mdserver-web | awk '{print $2}'"
data = mw.execShell(cmd)
if data[0] == '':

View File

@@ -21,16 +21,16 @@ Install_App()
mkdir -p $serverPath/source/gorse
SYSNAME=linux
if [ "$sysName" == "Darwin" ];then
if [ "$sysName" = "Darwin" ];then
SYSNAME=darwin
fi
ARCH="amd64"
if [ "$sysArch" == "x86_64" ];then
if [ "$sysArch" = "x86_64" ];then
ARCH="amd64"
elif [ "$sysArch" == "aarch64" ];then
elif [ "$sysArch" = "aarch64" ];then
ARCH="arm64"
elif [ "$sysArch" == "arm64" ];then
elif [ "$sysArch" = "arm64" ];then
ARCH="arm64"
else
ARCH="amd64"
@@ -88,7 +88,7 @@ Uninstall_App()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_App
else
Uninstall_App

View File

@@ -84,7 +84,7 @@ def getPidFile():
return tmp.groups()[0].strip()
def status():
cmd = "ps aux|grep grafana |grep -v grep | grep -v python | grep -v mdserver-web | awk '{print $2}'"
cmd = "ps -ef|grep grafana |grep -v grep | grep -v python | grep -v mdserver-web | awk '{print $2}'"
data = mw.execShell(cmd)
if data[0] == '':
return 'stop'

View File

@@ -18,17 +18,17 @@ sysName=`uname`
echo "use system: ${sysName}"
OSNAME=`bash ${rootPath}/scripts/getos.sh`
if [ "" == "$OSNAME" ];then
if [ "" = "$OSNAME" ];then
OSNAME=`cat ${rootPath}/data/osname.pl`
fi
if [ "macos" == "$OSNAME" ];then
if [ "macos" = "$OSNAME" ];then
echo "不支持Macox"
exit
fi
if [ -f ${rootPath}/bin/activate ];then
source ${rootPath}/bin/activate
. ${rootPath}/bin/activate
fi
if id grafana &> /dev/null ;then
@@ -78,7 +78,7 @@ Uninstall_App()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_App
else
Uninstall_App

View File

@@ -17,11 +17,11 @@ sysArch=`arch`
sysName=`uname`
ARCH_NAME=amd64
if [ "$sysArch" == "arm64" ];then
if [ "$sysArch" = "arm64" ];then
ARCH_NAME=arm64
elif [ "$sysArch" == "x86_64" ]; then
elif [ "$sysArch" = "x86_64" ]; then
ARCH_NAME=amd64
elif [ "$sysArch" == "aarch64" ]; then
elif [ "$sysArch" = "aarch64" ]; then
ARCH_NAME=aarch64
fi
@@ -54,7 +54,7 @@ Uninstall_App()
}
action=${1}
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_App
else
Uninstall_App

View File

@@ -22,7 +22,7 @@ else
useradd -g haproxy haproxy
fi
if [ "${2}" == "" ];then
if [ "${2}" = "" ];then
echo '缺少安装脚本...'
exit 0
fi
@@ -32,7 +32,7 @@ if [ ! -d $curPath/versions/$2 ];then
exit 0
fi
if [ "${action}" == "uninstall" ];then
if [ "${action}" = "uninstall" ];then
if [ -f /usr/lib/systemd/system/haproxy.service ] || [ -f /lib/systemd/system/haproxy.service ];then
systemctl stop haproxy
@@ -45,7 +45,7 @@ fi
sh -x $curPath/versions/$2/install.sh $1
if [ "${action}" == "install" ] && [ -d $serverPath/haproxy ];then
if [ "${action}" = "install" ] && [ -d $serverPath/haproxy ];then
#初始化
cd ${rootPath} && python3 ${rootPath}/plugins/haproxy/index.py start ${type}
cd ${rootPath} && python3 ${rootPath}/plugins/haproxy/index.py initd_install ${type}

View File

@@ -26,12 +26,12 @@ Install_App()
LOCAL_ADDR=common
cn=$(curl -fsSL -m 10 -s http://ipinfo.io/json | grep "\"country\": \"CN\"")
if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then
if [ ! -z "$cn" ] || [ "$?" = "0" ] ;then
LOCAL_ADDR=cn
fi
if [ "${LOCAL_ADDR}" == "cn" ];then
if [ "${LOCAL_ADDR}" = "cn" ];then
if [ ! -f ${APP_DIR}/haproxy-${VERSION}.tar.gz ];then
wget -O ${APP_DIR}/haproxy-${VERSION}.tar.gz https://dl.midoks.icu/soft/haproxy/haproxy-${VERSION}.tar.gz
fi
@@ -39,7 +39,7 @@ Install_App()
if [ ! -f ${APP_DIR}/haproxy-${VERSION}.tar.gz ];then
if [ $sysName == 'Darwin' ]; then
if [ $sysName = 'Darwin' ]; then
wget --no-check-certificate -O ${APP_DIR}/haproxy-${VERSION}.tar.gz https://www.haproxy.org/download/${MIN_VERSION}/src/haproxy-${VERSION}.tar.gz
else
curl -sSLo ${APP_DIR}/haproxy-${VERSION}.tar.gz https://www.haproxy.org/download/${MIN_VERSION}/src/haproxy-${VERSION}.tar.gz
@@ -53,7 +53,7 @@ Install_App()
cd ${APP_DIR} && tar -zxvf haproxy-${VERSION}.tar.gz
if [ "$OSNAME" == "macos" ];then
if [ "$OSNAME" = "macos" ];then
cd ${APP_DIR}/haproxy-${VERSION} && make TARGET=osx && make install PREFIX=$serverPath/haproxy
else
cd ${APP_DIR}/haproxy-${VERSION} && make TARGET=linux-glibc && make install PREFIX=$serverPath/haproxy
@@ -94,7 +94,7 @@ Uninstall_App()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_App
else
Uninstall_App

View File

@@ -26,12 +26,12 @@ Install_App()
LOCAL_ADDR=common
cn=$(curl -fsSL -m 10 -s http://ipinfo.io/json | grep "\"country\": \"CN\"")
if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then
if [ ! -z "$cn" ] || [ "$?" = "0" ] ;then
LOCAL_ADDR=cn
fi
if [ "${LOCAL_ADDR}" == "cn" ];then
if [ "${LOCAL_ADDR}" = "cn" ];then
if [ ! -f ${APP_DIR}/haproxy-${VERSION}.tar.gz ];then
wget -O ${APP_DIR}/haproxy-${VERSION}.tar.gz https://dl.midoks.icu/soft/haproxy/haproxy-${VERSION}.tar.gz
fi
@@ -39,7 +39,7 @@ Install_App()
if [ ! -f ${APP_DIR}/haproxy-${VERSION}.tar.gz ];then
if [ $sysName == 'Darwin' ]; then
if [ $sysName = 'Darwin' ]; then
wget --no-check-certificate -O ${APP_DIR}/haproxy-${VERSION}.tar.gz https://www.haproxy.org/download/${MIN_VERSION}/src/haproxy-${VERSION}.tar.gz
else
curl -sSLo ${APP_DIR}/haproxy-${VERSION}.tar.gz https://www.haproxy.org/download/${MIN_VERSION}/src/haproxy-${VERSION}.tar.gz
@@ -53,7 +53,7 @@ Install_App()
cd ${APP_DIR} && tar -zxvf haproxy-${VERSION}.tar.gz
if [ "$OSNAME" == "macos" ];then
if [ "$OSNAME" = "macos" ];then
cd ${APP_DIR}/haproxy-${VERSION} && make TARGET=osx && make install PREFIX=$serverPath/haproxy
else
cd ${APP_DIR}/haproxy-${VERSION} && make TARGET=linux-glibc && make install PREFIX=$serverPath/haproxy
@@ -94,7 +94,7 @@ Uninstall_App()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_App
else
Uninstall_App

View File

@@ -26,12 +26,12 @@ Install_App()
LOCAL_ADDR=common
cn=$(curl -fsSL -m 10 -s http://ipinfo.io/json | grep "\"country\": \"CN\"")
if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then
if [ ! -z "$cn" ] || [ "$?" = "0" ] ;then
LOCAL_ADDR=cn
fi
if [ "${LOCAL_ADDR}" == "cn" ];then
if [ "${LOCAL_ADDR}" = "cn" ];then
if [ ! -f ${APP_DIR}/haproxy-${VERSION}.tar.gz ];then
wget -O ${APP_DIR}/haproxy-${VERSION}.tar.gz https://dl.midoks.icu/soft/haproxy/haproxy-${VERSION}.tar.gz
fi
@@ -39,7 +39,7 @@ Install_App()
if [ ! -f ${APP_DIR}/haproxy-${VERSION}.tar.gz ];then
if [ $sysName == 'Darwin' ]; then
if [ $sysName = 'Darwin' ]; then
wget --no-check-certificate -O ${APP_DIR}/haproxy-${VERSION}.tar.gz https://www.haproxy.org/download/${MIN_VERSION}/src/haproxy-${VERSION}.tar.gz
else
curl -sSLo ${APP_DIR}/haproxy-${VERSION}.tar.gz https://www.haproxy.org/download/${MIN_VERSION}/src/haproxy-${VERSION}.tar.gz
@@ -53,7 +53,7 @@ Install_App()
cd ${APP_DIR} && tar -zxvf haproxy-${VERSION}.tar.gz
if [ "$OSNAME" == "macos" ];then
if [ "$OSNAME" = "macos" ];then
cd ${APP_DIR}/haproxy-${VERSION} && make TARGET=osx && make install PREFIX=$serverPath/haproxy
else
cd ${APP_DIR}/haproxy-${VERSION} && make TARGET=linux-glibc && make install PREFIX=$serverPath/haproxy
@@ -94,7 +94,7 @@ Uninstall_App()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_App
else
Uninstall_App

View File

@@ -26,12 +26,12 @@ Install_App()
LOCAL_ADDR=common
cn=$(curl -fsSL -m 10 -s http://ipinfo.io/json | grep "\"country\": \"CN\"")
if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then
if [ ! -z "$cn" ] || [ "$?" = "0" ] ;then
LOCAL_ADDR=cn
fi
if [ "${LOCAL_ADDR}" == "cn" ];then
if [ "${LOCAL_ADDR}" = "cn" ];then
if [ ! -f ${APP_DIR}/haproxy-${VERSION}.tar.gz ];then
wget -O ${APP_DIR}/haproxy-${VERSION}.tar.gz https://dl.midoks.icu/soft/haproxy/haproxy-${VERSION}.tar.gz
fi
@@ -39,7 +39,7 @@ Install_App()
if [ ! -f ${APP_DIR}/haproxy-${VERSION}.tar.gz ];then
if [ $sysName == 'Darwin' ]; then
if [ $sysName = 'Darwin' ]; then
wget --no-check-certificate -O ${APP_DIR}/haproxy-${VERSION}.tar.gz https://www.haproxy.org/download/${MIN_VERSION}/src/haproxy-${VERSION}.tar.gz
else
curl -sSLo ${APP_DIR}/haproxy-${VERSION}.tar.gz https://www.haproxy.org/download/${MIN_VERSION}/src/haproxy-${VERSION}.tar.gz
@@ -53,7 +53,7 @@ Install_App()
cd ${APP_DIR} && tar -zxvf haproxy-${VERSION}.tar.gz
if [ "$OSNAME" == "macos" ];then
if [ "$OSNAME" = "macos" ];then
cd ${APP_DIR}/haproxy-${VERSION} && make TARGET=osx && make install PREFIX=$serverPath/haproxy
else
cd ${APP_DIR}/haproxy-${VERSION} && make TARGET=linux-glibc && make install PREFIX=$serverPath/haproxy
@@ -94,7 +94,7 @@ Uninstall_App()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_App
else
Uninstall_App

View File

@@ -10,7 +10,7 @@ serverPath=$(dirname "$rootPath")
action=$1
type=$2
if [ "${2}" == "" ];then
if [ "${2}" = "" ];then
echo '缺少安装脚本...'
exit 0
fi

View File

@@ -21,9 +21,9 @@ ARCH="amd64"
get_arch() {
TMP_ARCH=`arch`
if [ "$TMP_ARCH" == "x86_64" ];then
if [ "$TMP_ARCH" = "x86_64" ];then
ARCH="amd64"
elif [ "$TMP_ARCH" == "aarch64" ];then
elif [ "$TMP_ARCH" = "aarch64" ];then
ARCH="arm64"
else
echo $ARCH
@@ -104,7 +104,7 @@ Uninstall_App()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_App
else
Uninstall_App

View File

@@ -118,7 +118,7 @@ def configScriptsTpl():
def status():
data = mw.execShell(
"ps aux|grep keepalived |grep -v grep | grep -v python | grep -v mdserver-web | awk '{print $2}'")
"ps -ef|grep keepalived |grep -v grep | grep -v python| awk '{print $2}'")
if data[0] == '':
return 'stop'

View File

@@ -91,7 +91,7 @@ Uninstall_App()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_App
else
Uninstall_App

View File

@@ -11,7 +11,7 @@ rootPath=$(dirname "$curPath")
SOFT=$1
if [ "$SOFT" == "mysql" ];then
if [ "$SOFT" = "mysql" ];then
bash ${rootPath}/keepalived/scripts/chk_mysql.sh > ${rootPath}/keepalived/keepalived.log
else
echo "you should use [chk.sh mysql] exp ."

View File

@@ -11,10 +11,10 @@ serverPath=$(dirname "$rootPath")
# cd /www/server/mdserver-web && python3 plugins/lam/index.py start
if [ -f ${rootPath}/bin/activate ];then
source ${rootPath}/bin/activate
. ${rootPath}/bin/activate
fi
if [ "$sys_os" == "Darwin" ];then
if [ "$sys_os" = "Darwin" ];then
BAK='_bak'
else
BAK=''
@@ -23,7 +23,7 @@ fi
sysName=`uname`
echo "use system: ${sysName}"
if [ "${sysName}" == "Darwin" ]; then
if [ "${sysName}" = "Darwin" ]; then
OSNAME='macos'
elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then
OSNAME='centos'
@@ -83,7 +83,7 @@ Uninstall_App()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_App $2
else
Uninstall_App $2

View File

@@ -115,7 +115,7 @@ def status():
return 'stop'
# data = mw.execShell(
# "ps aux|grep redis |grep -v grep | grep -v python | grep -v mdserver-web | awk '{print $2}'")
# "ps -ef|grep redis |grep -v grep | grep -v python | grep -v mdserver-web | awk '{print $2}'")
# if data[0] == '':
# return 'stop'

View File

@@ -38,7 +38,7 @@ Uninstall_App()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_App
else
Uninstall_App

View File

@@ -37,7 +37,7 @@ Uninstall_App()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_App
else
Uninstall_App

View File

@@ -91,7 +91,7 @@ def getPidFile():
return tmp.groups()[0].strip()
def status():
cmd = "ps aux|grep loki |grep -v grep | grep -v python | grep -v mdserver-web | awk '{print $2}'"
cmd = "ps -ef|grep loki |grep -v grep | grep -v python | grep -v mdserver-web | awk '{print $2}'"
data = mw.execShell(cmd)
if data[0] == '':
return 'stop'

View File

@@ -18,17 +18,17 @@ sysName=`uname`
echo "use system: ${sysName}"
OSNAME=`bash ${rootPath}/scripts/getos.sh`
if [ "" == "$OSNAME" ];then
if [ "" = "$OSNAME" ];then
OSNAME=`cat ${rootPath}/data/osname.pl`
fi
if [ "macos" == "$OSNAME" ];then
if [ "macos" = "$OSNAME" ];then
echo "不支持Macox"
exit
fi
if [ -f ${rootPath}/bin/activate ];then
source ${rootPath}/bin/activate
. ${rootPath}/bin/activate
fi
# if id grafana &> /dev/null ;then
@@ -77,7 +77,7 @@ Uninstall_App()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_App
else
Uninstall_App

View File

@@ -17,11 +17,11 @@ sysArch=`arch`
sysName=`uname`
ARCH_NAME=amd64
if [ "$sysArch" == "arm64" ];then
if [ "$sysArch" = "arm64" ];then
ARCH_NAME=arm64
elif [ "$sysArch" == "x86_64" ]; then
elif [ "$sysArch" = "x86_64" ]; then
ARCH_NAME=amd64
elif [ "$sysArch" == "aarch64" ]; then
elif [ "$sysArch" = "aarch64" ]; then
ARCH_NAME=aarch64
fi
@@ -77,7 +77,7 @@ curl -v -H "Content-Type: application/json" -XPOST "http://localhost:3100/loki/
-d "{\"streams\": [{\"stream\": {\"test\": \"test\"}, \"values\": [[\"$timestamp\", \"test message\"]]}]}"
action=${1}
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_App
else
Uninstall_App

View File

@@ -70,7 +70,7 @@ def getConf():
def status():
data = mw.execShell("which ipvsadm")
data = mw.execShell("command -v ipvsadm")
if data[0] == '':
return 'stop'
return 'start'

View File

@@ -18,7 +18,7 @@ Install_LVS(){
mkdir -p $serverPath/source
which ipvsadm
if [ "$?" == "0" ];then
if [ "$?" = "0" ];then
echo '已安装LVS!!'
exit 0
fi
@@ -27,17 +27,17 @@ Install_LVS(){
# 检测平台命令
which apt
if [ "$?" == "0" ];then
if [ "$?" = "0" ];then
apt install -y ipvsadm
fi
which yum
if [ "$?" == "0" ];then
if [ "$?" = "0" ];then
yum install -y ipvsadm
fi
which ipvsadm
if [ "$?" == "0" ];then
if [ "$?" = "0" ];then
echo '正在安装LVS成功!'
mkdir -p $serverPath/lvs
@@ -59,12 +59,12 @@ Uninstall_LVS()
{
# 检测平台命令
which apt
if [ "$?" == "0" ];then
if [ "$?" = "0" ];then
apt remove -y ipvsadm
fi
which yum
if [ "$?" == "0" ];then
if [ "$?" = "0" ];then
yum uninstall -y ipvsadm
fi
echo "卸载LVS完成"
@@ -75,7 +75,7 @@ Uninstall_LVS()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_LVS
else
Uninstall_LVS

View File

@@ -3,17 +3,13 @@ indexer {
}
searchd {
listen = 127.0.0.1:9322
listen = 127.0.0.1:9322:sphinx
listen = 127.0.0.1:9326:mysql
listen = 127.0.0.1:9328:http
log = /var/log/manticore/searchd.log
query_log = /var/log/manticore/query.log
pid_file = /var/run/manticore/searchd.pid
data_dir = /var/lib/manticore
workers = threads
binlog_path = /var/lib/manticore
max_children = 1000
max_matches = 1000000
#binlog_path = /var/lib/manticore/binlog
}

View File

@@ -21,6 +21,7 @@
<p onclick="pluginLogs('manticoresearch','','query_log', 30);">查询日志</p>
<p onclick="mcsRunStatus();">运行状态</p>
<p onclick="mcsCommonFunc();">常用功能</p>
<p onclick="pluginLogsContent('manticoresearch',$('.plugin_version').attr('version'),'systemctl_log');">服务运行日志</p>
<p onclick="mcsReadme();">说明</p>
</div>
<div class="bt-w-con pd15">

View File

@@ -141,15 +141,18 @@ def initDreplace():
dirs_list = [
"/var/log/manticore",
"/var/run/manticore",
"/var/lib/manticore"
"/var/lib/manticore",
]
index_dir = getServerDir() + '/index'
dirs_list.append(index_dir)
for d in dirs_list:
if not os.path.exists(d):
mw.execShell('mkdir -p ' + d)
mw.execShell("chown -R manticore:manticore /var/run/manticore")
mw.execShell("chown -R manticore:manticore "+index_dir)
# config replace
conf_bin = getConf()
@@ -205,8 +208,10 @@ def reload():
def rebuild():
fixIndexOwner()
cmd = 'indexer --all --rotate'
data = mw.execShell(cmd)
cmd_manticore = asManticore(cmd)
data = mw.execShell(cmd_manticore)
if data[0].find('successfully')<0:
return data[0].replace("\n","<br/>")
return 'ok'
@@ -273,6 +278,11 @@ def queryLog():
tmp = re.search(rep, content)
return tmp.groups()[0]
def systemctlLog():
cmd = "journalctl -u manticore -n 15 --no-pager"
data = mw.execShell(cmd)
return data[0]
def runStatus():
s = status()
@@ -284,7 +294,7 @@ def runStatus():
sh = sphinxapi.SphinxClient()
port = getMainPort()
sh.SetServer('127.0.0.1', port)
sh.SetServer('127.0.0.1', int(port))
info_status = sh.Status()
if info_status is None:
@@ -320,8 +330,8 @@ def sphinxConfParse():
file = getConf()
bin_dir = getServerDir()
content = mw.readFile(file)
rep = r'index\s(.*)'
sindex = re.findall(rep, content)
rep = r'^index\s+(\w+)'
sindex = re.findall(rep, content,re.MULTILINE)
indexlen = len(sindex)
cmd = {}
cmd['cmd'] = "indexer -c " + getConf()
@@ -413,6 +423,21 @@ def makeDbToSphinx():
return mw.returnJson(True,'测试中')
# 以 manticore 用户执行,避免生成文件属主为 root
def asManticore(cmd):
if mw.isAppleSystem():
return cmd
return 'su -s /bin/sh manticore -c "' + cmd + '"'
# 重建前修正索引目录归属,保证 manticore 用户有写权限
def fixIndexOwner():
index_dir = getServerDir() + '/index'
if not os.path.exists(index_dir):
return
mw.execShell("chown -R manticore:manticore " + index_dir)
# 全量更新
def updateAll():
data = sphinxConfParse()
@@ -421,10 +446,12 @@ def updateAll():
return '无更新'
index = data['index']
fixIndexOwner()
for x in range(len(index)):
cmd_index = cmd + ' ' + index[x]['index'] + ' --rotate'
subprocess.run(asManticore(cmd_index), shell=True)
print(cmd_index)
os.system(cmd_index)
return ''
#增量更新
@@ -435,15 +462,16 @@ def updateDelta():
return '无更新'
index = data['index']
fixIndexOwner()
for x in range(len(index)):
if 'delta' in index[x]:
cmd_index = cmd + ' ' + index[x]['delta'] + ' --rotate'
subprocess.run(asManticore(cmd_index), shell=True)
print(cmd_index)
os.system(cmd_index)
cmd_index_merge = cmd + ' --merge ' + index[x]['index'] + ' ' + index[x]['delta'] + ' --rotate'
subprocess.run(asManticore(cmd_index_merge), shell=True)
print(cmd_index_merge)
os.system(cmd_index_merge)
else:
print(index[x]['index'],'no delta')
@@ -491,6 +519,8 @@ if __name__ == "__main__":
print(runLog())
elif func == 'query_log':
print(queryLog())
elif func == 'systemctl_log':
print(systemctlLog())
elif func == 'run_status':
print(runStatus())
elif func == 'run_status_test':

View File

@@ -4,7 +4,7 @@
"name": "manticoresearch",
"title": "manticoresearch",
"shell": "install.sh",
"versions":["7.4.6"],
"versions":["debian", "code", "latest"],
"tip": "soft",
"install_pre_inspection":true,
"checks": "server/manticoresearch",

View File

@@ -0,0 +1,15 @@
[Unit]
Description=Manticore Search
After=network.target
[Service]
Type=simple
User=manticore
Group=manticore
ExecStart=/usr/local/bin/searchd -c /etc/manticoresearch/manticore.conf
ExecStop=/usr/local/bin/searchd -c /etc/manticoresearch/manticore.conf --stopwait
Restart=on-failure
LimitNOFILE=65536
[Install]
WantedBy=multi-user.target

View File

@@ -9,25 +9,36 @@ serverPath=$(dirname "$rootPath")
sysName=`uname`
sysArch=`arch`
# cd /www/server/mdserver-web/plugins/manticoresearch && bash install.sh install 7.4.6
# cd /Users/midoks/Desktop/mwdev/server/mdserver-web/plugins/manticoresearch && bash install.sh install latest
# cd /www/server/mdserver-web/plugins/manticoresearch && bash install.sh install code
# cd /www/server/mdserver-web/plugins/manticoresearch && bash install.sh install latest
# cd /www/server/mdserver-web && python3 plugins/manticoresearch/index.py run_status_test
# cd /www/server/mdserver-web && python3 plugins/manticoresearch/index.py start
# su -s /bin/sh manticore -c "indexer -c /etc/manticoresearch/manticore.conf xx --rotate"
# su -s /bin/sh manticore -c "indexer -c /etc/manticoresearch/manticore.conf xx_delta --rotate"
# systemctl status manticore
# systemctl restart manticore
if [ -f ${rootPath}/bin/activate ];then
source ${rootPath}/bin/activate
. ${rootPath}/bin/activate
fi
ACTION=$1
VERSION=$2
which apt
if [ "$?" == "0" ];then
if [ "$sysName" == "Darwin" ];then
sh -x $curPath/versions/mac/install.sh $1 $2
elif [ "$VERSION" == "code" ];then
sh -x $curPath/versions/source/install.sh $1 $2
elif [ "$VERSION" == "debian" ];then
sh -x $curPath/versions/apt/install.sh $1 $2
fi
which yum
if [ "$?" == "0" ];then
elif command -v apt >/dev/null 2>&1;then
sh -x $curPath/versions/apt/install.sh $1 $2
elif command -v yum >/dev/null 2>&1;then
sh -x $curPath/versions/yum/install.sh $1 $2
else
echo "unsupported system: ${sysName}"
exit 1
fi

View File

@@ -98,8 +98,8 @@ logs_file=$plugin_path/${rname}.log
''' % (mw_dir, name, getServerDir(), getPluginDir())
cmd += 'echo "★【`date +"%Y-%m-%d %H:%M:%S"`】 STSRT★" >> $logs_file' + "\n"
cmd += 'echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" >> $logs_file' + "\n"
cmd += 'echo "python3 $script_path/index.py update_all"' + "\n"
cmd += 'cd $mw_dir && python3 $script_path/index.py update_all' + "\n"
cmd += 'cd $mw_dir && . bin/activate && python3 plugins/manticoresearch/index.py update_all' + "\n"
cmd += 'echo "cd $mw_dir && . bin/activate && python3 plugins/manticoresearch/index.py update_all"' + "\n"
cmd += 'echo "【`date +"%Y-%m-%d %H:%M:%S"`】 END★" >> $logs_file' + "\n"
cmd += 'echo "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" >> $logs_file' + "\n"
@@ -147,8 +147,8 @@ logs_file=$plugin_path/${rname}.log
''' % (mw_dir, name, getServerDir(), getPluginDir())
cmd += 'echo "★【`date +"%Y-%m-%d %H:%M:%S"`】 STSRT★" >> $logs_file' + "\n"
cmd += 'echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" >> $logs_file' + "\n"
cmd += 'echo "python3 $script_path/index.py update_delta"' + "\n"
cmd += 'cd $mw_dir && python3 $script_path/index.py update_delta' + "\n"
cmd += 'cd $mw_dir && . bin/activate && python3 plugins/manticoresearch/index.py update_delta' + "\n"
cmd += 'echo "cd $mw_dir && . bin/activate && python3 plugins/manticoresearch/index.py update_delta"' + "\n"
cmd += 'echo "【`date +"%Y-%m-%d %H:%M:%S"`】 END★" >> $logs_file' + "\n"
cmd += 'echo "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" >> $logs_file' + "\n"

View File

@@ -3,7 +3,7 @@
#
searchd {
listen = 127.0.0.1:9322
listen = 127.0.0.1:9322:sphinx
listen = 127.0.0.1:9326:mysql
listen = 127.0.0.1:9328:http
log = /var/log/manticore/searchd.log

View File

@@ -1,9 +1,8 @@
searchd {
listen = 127.0.0.1:9322
listen = 127.0.0.1:9322:sphinx
listen = 127.0.0.1:9326:mysql
listen = 127.0.0.1:9328:http
log = /var/log/manticore/searchd.log
query_log = /var/log/manticore/query.log
pid_file = /var/run/manticore/searchd.pid
data_dir = /var/lib/manticore
}

View File

@@ -10,7 +10,7 @@ sysName=`uname`
sysArch=`arch`
if [ -f ${rootPath}/bin/activate ];then
source ${rootPath}/bin/activate
. ${rootPath}/bin/activate
fi
VERSION=$2
@@ -23,21 +23,23 @@ Install_App()
MC_DIR=${serverPath}/source/manticoresearch
mkdir -p $MC_DIR
# wget --no-check-certificate -O /www/server/source/manticoresearch/manticore-repo.noarch.deb https://repo.manticoresearch.com/manticore-repo.noarch.deb
# cd /www/server/source/manticoresearch/ && dpkg -i manticore-repo.noarch.deb
wget --no-check-certificate -O $MC_DIR/manticore-repo.noarch.deb https://repo.manticoresearch.com/manticore-repo.noarch.deb
dpkg -i $MC_DIR/manticore-repo.noarch.deb
apt update -y
apt -y install manticore manticore-extra
apt -y install manticore
apt -y install manticore-extra
apt -y upgrade manticore
echo "${VERSION}" > $serverPath/manticoresearch/version.pl
cd ${rootPath} && python3 plugins/manticoresearch/index.py start ${VERSION}
cd ${rootPath} && python3 plugins/manticoresearch/index.py initd_install ${VERSION}
if [ -d ${MC_DIR} ];then
rm -rf ${MC_DIR}
fi
# if [ -d ${MC_DIR} ];then
# rm -rf ${MC_DIR}
# fi
}
Uninstall_App()
@@ -45,7 +47,8 @@ Uninstall_App()
cd ${rootPath} && python3 plugins/manticoresearch/index.py stop ${VERSION}
cd ${rootPath} && python3 plugins/manticoresearch/index.py initd_uninstall ${VERSION}
apt -y remove manticore manticore-extra
apt -y remove manticore
apt -y remove manticore-extra
apt -y autoremove
if [ -d $serverPath/manticoresearch ];then
@@ -64,7 +67,7 @@ Uninstall_App()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_App
else
Uninstall_App

View File

@@ -0,0 +1,166 @@
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin
export PATH
curPath=`pwd`
rootPath=$(dirname "$curPath")
rootPath=$(dirname "$rootPath")
serverPath=$(dirname "$rootPath")
sysName=`uname`
sysArch=`arch`
if [ -f ${rootPath}/bin/activate ];then
. ${rootPath}/bin/activate
fi
VERSION=$2
action=$1
if [ "${VERSION}" = "latest" ] || [ -z "${VERSION}" ];then
VERSION=$(curl -fsSL https://api.github.com/repos/manticoresoftware/manticoresearch/releases/latest 2>/dev/null | grep -o '"tag_name": *"release-[^"]*"' | head -n 1 | sed 's/.*release-//;s/"//')
if [ -z "${VERSION}" ];then
VERSION=29.9.0
fi
fi
# 下载文件,直连失败时走加速镜像
download_file()
{
src=$1
dst=$2
for url in "$src" "https://ghproxy.net/$src" "https://gh-proxy.com/$src" "https://ghfast.top/$src"
do
if curl -fsSL --retry 2 --connect-timeout 20 -o "$dst" "$url";then
return 0
fi
rm -f "$dst"
done
return 1
}
Install_App()
{
echo '正在安装manticoresearch...'
mkdir -p $serverPath/manticoresearch
MC_DIR=${serverPath}/source/manticoresearch
mkdir -p $MC_DIR
# https://github.com/manticoresoftware/manticoresearch/archive/refs/tags/release-29.9.0.tar.gz
MC_SRC=$MC_DIR/manticoresearch-release-${VERSION}
if [ ! -d $MC_SRC ];then
# 必须带 --recursive,否则缺少 mcl 子模块会导致 cmake 失败
if ! git clone --depth 1 --branch release-${VERSION} --recursive \
https://github.com/manticoresoftware/manticoresearch.git $MC_SRC;then
rm -rf $MC_SRC
if [ ! -f $MC_DIR/release-${VERSION}.tar.gz ];then
download_file "https://github.com/manticoresoftware/manticoresearch/archive/refs/tags/release-${VERSION}.tar.gz" $MC_DIR/release-${VERSION}.tar.gz
fi
cd $MC_DIR && tar -zxvf release-${VERSION}.tar.gz
fi
fi
# 源码包方式没有子模块,单独补全 mcl(子模块地址见 .gitmodules: manticoresoftware/columnar)
if [ ! -f $MC_SRC/mcl/CMakeLists.txt ];then
echo 'initializing mcl submodule...'
rm -rf $MC_SRC/mcl
MCL_SHA=$(curl -fsSL "https://api.github.com/repos/manticoresoftware/manticoresearch/contents/mcl?ref=release-${VERSION}" 2>/dev/null | grep -o '"sha": *"[0-9a-f]*"' | head -n 1 | sed 's/.*"sha": *"//;s/"//')
if ! git clone https://github.com/manticoresoftware/columnar.git $MC_SRC/mcl;then
echo "mcl clone failed!"
exit 1
fi
if [ -n "${MCL_SHA}" ];then
cd $MC_SRC/mcl && git checkout ${MCL_SHA}
fi
fi
if [ ! -f $MC_SRC/mcl/CMakeLists.txt ];then
echo "MCL submodule is required at $MC_SRC/mcl."
exit 1
fi
# 预先下载 CRoaring,避免 cmake FetchContent 直连 github 下载失败
ROARING_VER=4.3.2
ROARING_SRC=$MC_DIR/deps/CRoaring-${ROARING_VER}
if [ ! -d $ROARING_SRC ];then
mkdir -p $MC_DIR/deps
ROARING_TGZ=$MC_DIR/deps/roaring-v${ROARING_VER}.tar.gz
if [ ! -s $ROARING_TGZ ];then
if ! download_file "https://github.com/RoaringBitmap/CRoaring/archive/refs/tags/v${ROARING_VER}.tar.gz" "$ROARING_TGZ";then
echo "roaring download failed!"
exit 1
fi
fi
tar -zxvf $ROARING_TGZ -C $MC_DIR/deps
fi
if [ ! -f $ROARING_SRC/CMakeLists.txt ];then
echo "roaring source is required at $ROARING_SRC."
exit 1
fi
# 上次配置失败残留的 build 目录会保留 FetchContent 失败状态,先清理
if [ -d $MC_SRC/build ] && [ ! -f $MC_SRC/build/Makefile ];then
rm -rf $MC_SRC/build
fi
mkdir -p $MC_SRC/build
cd $MC_SRC/build
cmake .. -DBOOST_ROOT="$(brew --prefix boost)" \
-DCMAKE_PREFIX_PATH="$(brew --prefix boost);$(brew --prefix icu4c@79);$(brew --prefix openssl@3)" \
-DICU_ROOT="$(brew --prefix icu4c@79)" \
-DOPENSSL_ROOT_DIR="$(brew --prefix openssl@3)" \
-DFETCHCONTENT_SOURCE_DIR_ROARING="$ROARING_SRC" \
-DDISTR=macos \
-DWITH_GALERA=OFF
if [ ! -f Makefile ];then
echo "manticoresearch cmake configure failed!"
exit 1
fi
JOBS=$(sysctl -n hw.ncpu 2>/dev/null || echo 4)
if ! make -j${JOBS};then
echo "manticoresearch build failed!"
exit 1
fi
echo "${VERSION}" > $serverPath/manticoresearch/version.pl
cd ${rootPath} && python3 plugins/manticoresearch/index.py start ${VERSION}
cd ${rootPath} && python3 plugins/manticoresearch/index.py initd_install ${VERSION}
# if [ -d $MC_DIR/manticoresearch-release-${VERSION} ];then
# rm -rf $MC_DIR/manticoresearch-release-${VERSION}
# fi
echo "install manticoresearch successful!"
}
Uninstall_App()
{
cd ${rootPath} && python3 plugins/manticoresearch/index.py stop ${VERSION}
cd ${rootPath} && python3 plugins/manticoresearch/index.py initd_uninstall ${VERSION}
if [ -d $serverPath/manticoresearch ];then
rm -rf $serverPath/manticoresearch
fi
if [ -f /usr/lib/systemd/system/manticore.service ] || [ -f /lib/systemd/system/manticore.service ];then
systemctl stop manticore
systemctl disable manticore
rm -rf /usr/lib/systemd/system/manticore.service
rm -rf /lib/systemd/system/manticore.service
systemctl daemon-reload
fi
echo "uninstall manticoresearch successful!"
}
if [ "${1}" = 'install' ] || [ "$action" = "upgrade" ];then
Install_App
elif [ "${1}" = 'uninstall' ];then
Uninstall_App
else
echo "OPTIONS ERROR"
fi

Some files were not shown because too many files have changed in this diff Show More