Compare commits

...
420 Commits
Author SHA1 Message Date
dami 36ca82c1b4 update 2026-09-11 21:52:24 +08:00
dami acd46f4724 update 2026-09-11 21:28:59 +08:00
dami 370ff99134 update 2026-09-11 21:10:03 +08:00
dami aa317ee2f5 update 2026-09-11 20:47:27 +08:00
dami 44600b5657 update 2026-09-11 20:42:39 +08:00
dami ea45316a32 update 2026-09-11 20:32:22 +08:00
dami 6cd13022f1 Update install.sh 2026-09-11 20:31:05 +08:00
dami 91ff2f7550 update 2026-09-11 20:30:55 +08:00
dami 483b5b090d Update install.sh 2026-09-11 20:18:46 +08:00
dami 6087931c58 Update install.sh 2026-09-11 20:18:28 +08:00
dami 9014fd8911 Update install.sh 2026-09-11 20:18:07 +08:00
dami 76f7f51d80 Update install.sh 2026-09-11 20:15:43 +08:00
dami 0c4902e01e Update install.sh 2026-09-11 20:13:34 +08:00
dami 175fb089cd Update install.sh 2026-09-11 20:13:11 +08:00
dami 7b8a4a38b3 Update install.sh 2026-09-11 20:12:33 +08:00
dami ebf920ed12 Update install.sh 2026-09-11 20:08:55 +08:00
dami bb8591f5e5 update 2026-09-11 20:06:25 +08:00
dami b8573e1f1f Update plugin.py 2026-09-11 20:04:59 +08:00
dami dacc1e5ad8 update 2026-09-11 20:00:47 +08:00
dami 8cc64e32dd update 2026-09-11 19:55:44 +08:00
dami 1d294cc3b1 Update index.py 2026-09-11 19:51:42 +08:00
dami f9da2e4391 update 2026-09-11 19:46:15 +08:00
dami 3b78079cd2 Update install.sh 2026-09-11 19:35:40 +08:00
dami 07a0a1be48 Update install.sh 2026-09-11 19:31:44 +08:00
dami 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
dami 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
dami c239f35382 Update firewall.py 2026-09-02 08:25:34 +08:00
dami 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
dami c1fd4fa24c Update __init__.py 2026-08-26 18:15:43 +08:00
dami 7239b22759 update 2026-08-16 00:14:39 +08:00
dami 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
dami 49bbca8faa Update index.py 2026-07-22 13:03:46 +08:00
dami 8b86cd5e63 up 2026-07-22 13:00:43 +08:00
dami 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
dami b68c9edc3e Update index.py 2026-07-21 20:37:12 +08:00
dami 650365997a Update index.py 2026-07-21 20:36:34 +08:00
dami 3279404595 Update info.json 2026-07-21 20:35:41 +08:00
dami d32a94dccf Update install.sh 2026-07-21 20:34:44 +08:00
dami 80d846f247 Update install.sh 2026-07-21 20:31:08 +08:00
dami eadcbe336d Update install.sh 2026-07-21 20:26:57 +08:00
dami 474d0f075f Update install.sh 2026-07-21 20:26:33 +08:00
dami 2d6a41e19f Update install.sh 2026-07-21 12:03:36 +08:00
dami 1f24944417 Update caddy.service.tpl 2026-07-21 11:51:42 +08:00
dami 4ab3409e54 Update index.py 2026-07-21 11:43:14 +08:00
dami c3ad146303 update 2026-07-21 11:38:30 +08:00
dami 745cd304fb Update install.sh 2026-07-21 00:33:05 +08:00
dami e6efefd1fd Update install.sh 2026-07-21 00:11:57 +08:00
dami 1350404c58 Update install.sh 2026-07-21 00:10:03 +08:00
dami 9cdd2274fa Update install.sh 2026-07-21 00:08:53 +08:00
dami cc204ad721 Update install.sh 2026-07-21 00:00:26 +08:00
dami 8eb1614b31 Update install.sh 2026-07-20 23:50:41 +08:00
dami 9c2e9627ec update 2026-07-20 23:48:18 +08:00
dami 87123c526a update 2026-07-20 23:45:15 +08:00
dami 7c3ebc6e35 Update ubuntu.sh 2026-07-20 23:42:08 +08:00
dami 6c5bf63424 Update ubuntu.sh 2026-07-20 23:38:00 +08:00
dami 13fd47e7d4 Update ubuntu.sh 2026-07-20 23:36:38 +08:00
dami fc1321584a Update ubuntu.sh 2026-07-20 23:36:25 +08:00
dami bab3ae16d3 Update ubuntu.sh 2026-07-20 23:33:35 +08:00
dami ab8498e519 Update ubuntu.sh 2026-07-20 23:33:13 +08:00
dami 0e480c7ad8 update 2026-07-20 23:29:01 +08:00
dami 7ed8558ff0 Update ubuntu.sh 2026-07-20 23:22:35 +08:00
dami 4ed2f0caa9 update 2026-07-20 23:19:31 +08:00
dami f275eabe1b Update file.py 2026-07-20 23:08:01 +08:00
dami fe13ab1e5f Update file.py 2026-07-20 23:07:46 +08:00
dami 6ed045cf94 update 2026-07-20 22:41:10 +08:00
dami ef333ff142 update 2026-07-20 22:23:37 +08:00
dami dac2f5240f Update install.sh 2026-07-20 22:18:45 +08:00
dami cebfc2fc91 update 2026-07-20 22:17:22 +08:00
dami 1da865c1b2 Update install.sh 2026-07-20 16:46:29 +08:00
dami 2abdaaa7ce Update install.sh 2026-07-20 16:45:08 +08:00
dami c62142cf6b Update requirements.txt 2026-07-20 16:04:57 +08:00
dami 7c1820b6cd update 2026-07-20 15:59:27 +08:00
dami a24af95d24 Update install.sh 2026-07-20 15:39:32 +08:00
dami 1326c282c8 Update requirements.txt 2026-07-20 15:33:13 +08:00
dami b7e84749f1 Update debian.sh 2026-07-20 15:26:10 +08:00
dami 8a65158540 Update db.py 2026-07-20 15:21:46 +08:00
dami a576c521a2 Update ubuntu.sh 2026-07-20 15:17:24 +08:00
dami 736a387a71 Update ubuntu.sh 2026-07-20 15:15:23 +08:00
dami 090205c372 update 2026-07-20 13:41:03 +08:00
dami fda0bddc8f Update db.py 2026-07-20 13:26:23 +08:00
dami 292b18468d Update db.py 2026-07-20 13:24:57 +08:00
dami 47aab245fc Update panel_task.py 2026-07-20 12:42:24 +08:00
dami 39bd601825 Update mw.py 2026-07-20 12:32:39 +08:00
dami b744adeb13 Update monitor.py 2026-07-20 11:46:30 +08:00
dami 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
dami 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
dami d0de121721 Update update.sh 2026-07-09 15:14:16 +08:00
dami 957e2db3d0 Update update.sh 2026-07-09 15:06:33 +08:00
dami fb0be5549d Update update.sh 2026-07-09 15:04:40 +08:00
dami 8a9132d557 Update update.sh 2026-07-09 14:52:08 +08:00
dami 04d10435c2 Update update.sh 2026-07-09 14:51:29 +08:00
dami 92543e10fa Update update.sh 2026-07-09 14:46:38 +08:00
dami 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
dami 75610a4559 Update crontab.js 2026-07-09 14:22:26 +08:00
dami 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
dami ef9053aa7e Update webstats_index.py 2026-07-08 16:47:05 +08:00
dami 018fcb7afb Update index.py 2026-07-08 16:46:45 +08:00
dami 5cc9a67152 Update mw.py 2026-07-07 23:54:17 +08:00
dami 54895f1d0a Update mw.py 2026-07-07 23:38:29 +08:00
dami 91dfecf882 up 2026-07-07 23:36:34 +08:00
dami 2f09e227d1 Update tool_migrate.py 2026-07-07 23:12:23 +08:00
dami 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
dami 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
dami 4f4d1e7580 Update webstats_common.lua 2026-07-07 02:15:57 +08:00
dami 6e2a8e0a12 up 2026-07-07 02:12:09 +08:00
dami 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
dami 4e3e7864be Update tool_migrate.py 2026-07-06 21:02:13 +08:00
dami 6f51eaa298 update 2026-07-06 20:59:32 +08:00
dami 39bd87e868 Update tool_migrate.py 2026-07-06 20:54:00 +08:00
dami 18443aab60 Update tool_migrate.py 2026-07-06 20:49:20 +08:00
dami b88ea7aa3c update 2026-07-06 20:32:36 +08:00
dami 6a6f6e6062 Update tool_migrate.py 2026-07-06 20:27:17 +08:00
dami 5839dbcd6b Update tool_migrate.py 2026-07-06 20:05:10 +08:00
dami b46f45569e Update tool_migrate.py 2026-07-06 20:01:23 +08:00
dami 5cdc5af8cd Update tool_migrate.py 2026-07-06 19:50:13 +08:00
dami 4f38a9f3ff Update tool_migrate.py 2026-07-06 19:49:58 +08:00
dami 9c83695187 Create tool_migrate.py 2026-07-06 19:44:14 +08:00
dami f9be534101 update 2026-07-06 19:24:36 +08:00
dami 58ab48ac15 Update webstats_common.lua 2026-07-06 19:11:48 +08:00
dami f34e93192d Update webstats_common.lua 2026-07-06 19:10:17 +08:00
dami 31106f2b13 Update webstats_common.lua 2026-07-06 19:03:27 +08:00
dami 468cc54cf5 Update webstats_common.lua 2026-07-06 18:55:25 +08:00
dami 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
dami 167dd11548 Update webstats_log.lua 2026-07-05 15:47:23 +08:00
dami 03fdbf2604 Merge branch 'master' into dev 2026-07-05 15:43:18 +08:00
dami edbdec8370 Update init.sql 2026-07-05 15:42:44 +08:00
dami 8f1c9f9471 up 2026-07-05 15:38:54 +08:00
dami d35d16943d up 2026-07-05 15:34:56 +08:00
dami 3ac4270dee Update stats.js 2026-07-05 15:30:16 +08:00
dami 90777e08ff update 2026-07-05 15:28:56 +08:00
dami b47d1262ac Update push_notice_msg.py 2026-07-05 15:11:57 +08:00
dami e28081a7c5 Update stats.js 2026-07-05 15:04:05 +08:00
dami 5f7d6c1488 Create webstats_common.lua.bk1.txt 2026-07-05 14:46:32 +08:00
dami 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
dami e62bd7c5a6 Update webstats_log.lua 2026-07-05 14:07:31 +08:00
dami 1ad3d2f187 Update webstats_log.lua 2026-07-05 13:41:19 +08:00
dami 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
dami 8ccba2f6d5 Update webstats_log.lua 2026-07-05 04:08:00 +08:00
dami 2e9f01d3ee Update webstats_log.lua 2026-07-05 04:05:19 +08:00
dami d1dcdd4f25 Update webstats_common.lua 2026-07-05 03:58:34 +08:00
dami 60958d1403 Update webstats_common.lua 2026-07-05 03:56:13 +08:00
dami 5530b14f36 Update webstats_common.lua 2026-07-05 03:36:39 +08:00
dami 64c9942ee1 Update webstats_common.lua 2026-07-05 03:36:26 +08:00
dami bc1437dac4 Update webstats_init_worker.lua 2026-07-05 03:27:35 +08:00
dami 1d9576e838 Update webstats_log.lua 2026-07-05 03:27:11 +08:00
dami 8b275a5df4 Update webstats_log.lua 2026-07-05 03:18:14 +08:00
dami 40d9334dcf Update index.py 2026-07-05 02:45:28 +08:00
dami 98c0242819 Update index.py 2026-07-05 02:39:23 +08:00
dami a2fb03f9b8 Update index.py 2026-07-05 02:31:20 +08:00
dami 98815ac5c3 update 2026-07-05 02:29:29 +08:00
dami 073dd20c96 update 2026-07-05 01:16:02 +08:00
dami 23af9085a9 update 2026-07-05 00:51:14 +08:00
dami bcaec6b6ee Update install.sh 2026-07-04 23:42:10 +08:00
dami 4063bea922 Update webstats_common.lua 2026-07-04 23:02:54 +08:00
dami 9f864b3407 Update webstats_common.lua 2026-07-04 22:56:49 +08:00
dami 01ac598e39 Update webstats_common.lua 2026-07-04 22:43:20 +08:00
dami 77a0d3af36 Update webstats_common.lua 2026-07-04 22:35:03 +08:00
dami 8d34bbea47 Update webstats_common.lua 2026-07-04 22:33:43 +08:00
dami be18e98001 Update webstats_common.lua 2026-07-04 22:23:56 +08:00
dami 754e0f98f9 Update webstats_common.lua 2026-07-04 22:23:43 +08:00
dami 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
dami 55d4784fe2 Update webstats_common.lua 2026-07-02 14:30:04 +08:00
dami f26e8bc520 update 2026-07-02 14:22:10 +08:00
dami 7b5f1a4253 up 2026-07-02 14:12:32 +08:00
dami 1058fb7e1f Update webstats_log.lua 2026-07-02 14:01:50 +08:00
dami 0f1b95cdfc up 2026-07-02 13:54:31 +08:00
dami 8ea16fcd85 Update webstats_common.lua 2026-07-02 13:32:22 +08:00
dami b4b9496980 Update webstats_common.lua 2026-07-02 13:15:12 +08:00
dami 8dfd26361f Update webstats_common.lua 2026-07-02 13:06:32 +08:00
dami cb5bd32b86 Update webstats_common.lua 2026-07-02 13:02:31 +08:00
dami 2584330d40 update 2026-07-02 12:52:05 +08:00
dami ebe6333ac9 up 2026-07-02 12:50:35 +08:00
dami 534892280e up 2026-07-02 12:45:28 +08:00
dami df05cf69cf Update tool_migrate.py 2026-07-02 12:27:43 +08:00
dami 2f782cf6a2 Update db.py 2026-07-02 12:26:19 +08:00
dami 6f483c17e6 Create tool_migrate_bak.py 2026-07-02 11:42:13 +08:00
dami 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
dami d73fe4b29c Update __init__.py 2026-06-29 00:51:14 +08:00
dami 2c61be084b Update __init__.py 2026-06-29 00:38:56 +08:00
dami fe5f8d1997 Update __init__.py 2026-06-29 00:38:08 +08:00
dami 2653291ded Update __init__.py 2026-06-29 00:37:42 +08:00
dami 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
dami c554c19a12 Update site.py 2026-06-28 23:10:34 +08:00
dami 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
dami a11d24723d Update README.md 2026-06-28 22:43:37 +08:00
dami 3b858476f1 Update version.py 2026-06-28 22:41:13 +08:00
dami 5560b68ac1 Update site.js 2026-06-28 22:40:26 +08:00
dami 8bfd381363 Update site.py 2026-06-28 22:38:29 +08:00
dami c6cfe2a22c Update mw.py 2026-06-28 22:34:51 +08:00
dami 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
dami c72c1bc889 Update update.sh 2026-06-22 17:59:31 +08:00
dami 6e61a535ca Update update.sh 2026-06-22 17:54:37 +08:00
dami c1f69ea1c7 Update update.sh 2026-06-22 17:51:11 +08:00
dami 984599c56f Update update.sh 2026-06-22 17:50:22 +08:00
dami 038bb31ec3 Update update.sh 2026-06-22 17:48:58 +08:00
dami 1ac541d16e Update update.sh 2026-06-22 17:48:47 +08:00
dami ecaa0e99c5 Update update.sh 2026-06-22 17:45:38 +08:00
dami 666ebeef0d Update update.sh 2026-06-22 17:43:53 +08:00
dami b39a936fa4 Update update.sh 2026-06-22 17:41:12 +08:00
dami d434dce568 Update update.sh 2026-06-22 17:40:21 +08:00
dami 6acb390133 Update update.sh 2026-06-22 17:30:59 +08:00
dami 3c6f3c50c4 Update update.sh 2026-06-22 17:28:40 +08:00
dami c52e707421 Update update.sh 2026-06-22 17:21:11 +08:00
dami 5fb998c221 update 2026-06-22 17:15:18 +08:00
dami a0989ea833 Update nezha.js 2026-06-22 17:12:09 +08:00
dami 5e565c06a0 Update nezha.js 2026-06-22 17:09:22 +08:00
dami 69b96aa5fa Create update.sh 2026-06-22 17:08:16 +08:00
dami bce9de1494 Update nezha.js 2026-06-22 17:05:57 +08:00
dami 3de7928be7 Update nezha.js 2026-06-22 17:05:30 +08:00
dami 41630ef01a Update install.sh 2026-06-22 17:03:46 +08:00
dami bf29cb1a4d Update index.py 2026-06-22 16:59:49 +08:00
dami 8f79a4ab86 update 2026-06-22 16:59:23 +08:00
dami 0ad933c5ad Update nezha.js 2026-06-22 16:55:33 +08:00
dami 5ed9470d83 update 2026-06-22 16:53:26 +08:00
dami cac468f454 Update plugin.py 2026-06-22 16:33:54 +08:00
dami f0f9dcf4de Update index.py 2026-06-22 16:32:59 +08:00
dami 3e0e84a4f6 Update index.py 2026-06-22 16:09:53 +08:00
dami ef8080b420 Update index.py 2026-06-22 16:05:57 +08:00
dami b5fab1fb10 Update plugin.py 2026-06-22 16:03:41 +08:00
dami c3f019d4ff Update plugin.py 2026-06-22 16:00:40 +08:00
dami 701f172276 Update plugin.py 2026-06-22 15:56:05 +08:00
dami 9e8c736cb4 Update install.sh 2026-06-22 15:31:31 +08:00
dami c8589d750c Update info.json 2026-06-22 15:30:42 +08:00
dami 5bb20a01de update 2026-06-22 15:16:01 +08:00
dami 6e4bf9da3e Update nezha.js 2026-06-22 15:02:39 +08:00
dami c21ddb5c63 Update install.sh 2026-06-22 14:43:12 +08:00
dami 431295cec9 update 2026-06-22 14:42:54 +08:00
dami 180cb84b2c Update index.py 2026-06-22 14:42:14 +08:00
dami 66b5f322d9 Update index.py 2026-06-22 14:41:00 +08:00
dami f00dc248bd Update install.sh 2026-06-22 14:40:16 +08:00
dami dbba5db9f7 Update info.json 2026-06-22 14:40:06 +08:00
dami 3a8b799df6 Update index.py 2026-06-22 14:39:29 +08:00
dami 0b99a4ae74 update 2026-06-22 14:35:51 +08:00
dami 99b77d347a update 2026-06-22 14:30:08 +08:00
dami 8235a88ecc Update nezha.js 2026-06-22 14:27:32 +08:00
dami 564ba30f91 Update install.sh 2026-06-22 14:23:48 +08:00
dami aa8535d513 update 2026-06-22 14:22:40 +08:00
dami a02ef2575b Update install.sh 2026-06-22 14:21:10 +08:00
dami a0be16c0fa Update install.sh 2026-06-22 14:12:24 +08:00
dami 548d87e339 Update install.sh 2026-06-22 14:12:14 +08:00
dami c704aa0817 Update install.sh 2026-06-22 14:10:03 +08:00
dami c6a060fde5 Update install.sh 2026-06-22 14:09:51 +08:00
dami 762e88cc44 Update index.py 2026-06-22 14:05:03 +08:00
dami b7f671d1d5 update 2026-06-22 14:04:45 +08:00
dami 48706d01f9 Update index.py 2026-06-22 14:04:21 +08:00
dami fb53354956 Update index.py 2026-06-22 14:03:54 +08:00
dami 5995147054 Update index.py 2026-06-22 13:59:22 +08:00
dami fed9f458d1 Update install.sh 2026-06-22 13:49:41 +08:00
dami 7987564401 Update install.sh 2026-06-22 13:45:08 +08:00
dami 90ae21fb8b Update nezha.service.tpl 2026-06-22 13:43:14 +08:00
dami 56a78d174d Update install.sh 2026-06-22 13:31:25 +08:00
dami 37da947b90 Update install.sh 2026-06-22 13:31:09 +08:00
dami f23e272027 Update install.sh 2026-06-22 13:27:25 +08:00
dami 10afc0a2d5 Update install.sh 2026-06-22 13:19:13 +08:00
dami f59c8ea533 Update install.sh 2026-06-22 13:17:26 +08:00
dami 4153ea7431 update 2026-06-22 13:16:32 +08:00
dami 2c73577798 Update nezha.js 2026-06-22 13:08:33 +08:00
dami 0b5c53ef7e Update index.html 2026-06-22 12:55:34 +08:00
dami 0fca0d54f8 Update info.json 2026-06-22 12:53:08 +08:00
dami 3da0c5b2b6 Update install.sh 2026-06-22 12:52:55 +08:00
dami d8519bc1c3 update 2026-06-22 12:49:08 +08:00
dami 33a4a799c5 Update index.py 2026-06-22 12:48:46 +08:00
dami 358a021ba6 Update install.sh 2026-06-22 12:47:54 +08:00
dami 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
dami a2c27134a8 update 2026-06-21 10:30:30 +08:00
dami 66c60ec10e Update r3.9.txt 2026-06-21 10:25:42 +08:00
dami 867b39d8e1 Update r3.9.txt 2026-06-21 10:25:12 +08:00
dami 1c8997d44a Update requirements.txt 2026-06-21 10:23:14 +08:00
dami 88b5112e30 Update requirements.txt 2026-06-21 10:20:39 +08:00
dami 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
dami 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
dami 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
dami 4d0b7bc127 Update mw.py 2026-06-20 19:27:39 +08:00
dami ce917b227f Merge branch 'master' into dev 2026-06-20 18:58:41 +08:00
dami 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
dami 8110fbf701 Update openresty.js 2026-06-20 18:44:03 +08:00
dami cf502ebf05 Update openresty.js 2026-06-20 18:37:41 +08:00
dami 7c7837b967 up 2026-06-20 18:25:40 +08:00
dami 3bfc1cacb0 Update openresty.js 2026-06-20 18:20:52 +08:00
dami cd2ea26608 Update openresty.js 2026-06-20 18:15:52 +08:00
dami 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
dami 241c4dc600 Update install.sh 2026-06-20 15:24:32 +08:00
dami 18e93d2b24 Update info.json 2026-06-20 15:13:08 +08:00
dami 084cf6b761 Update info.json 2026-06-20 14:42:54 +08:00
dami 47ddf5f4e6 Update install.sh 2026-06-20 14:40:58 +08:00
dami 325321f5d4 Update install.sh 2026-06-20 14:32:38 +08:00
dami ecbeca3d35 Update install.sh 2026-06-20 14:29:40 +08:00
dami 862b434c72 Update install.sh 2026-06-20 14:29:10 +08:00
dami 6376ed3b7b update 2026-06-20 14:28:23 +08:00
dami 42e40d1718 Update push_notice_msg.py 2026-06-18 14:33:55 +08:00
dami 1c1cc12058 Update install.sh 2026-06-18 02:23:01 +08:00
dami 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
dami a06e5a6e55 Update gd_old.sh 2026-06-17 18:21:15 +08:00
dami 85bf429a08 Update freetype_old.sh 2026-06-17 18:14:30 +08:00
dami dd6ba45cdd Update gd_old.sh 2026-06-17 17:39:36 +08:00
dami ab967efa64 Update gd_old.sh 2026-06-17 17:16:14 +08:00
dami 369505e1a0 Update r3.9.txt 2026-06-12 18:18:08 +08:00
dami 86d858a0fb Update r3.9.txt 2026-06-12 18:15:50 +08:00
dami 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
dami 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
dami 0adfebfad6 Update install.sh 2026-06-12 16:25:58 +08:00
dami 66c4225aa3 update 2026-06-09 11:11:15 +08:00
dami 6ddef9ffda Update setting.py 2026-06-08 17:56:08 +08:00
dami 27a1b22e6f Update setting.py 2026-06-08 17:54:45 +08:00
dami f9c18cb225 update 2026-06-07 00:10:11 +08:00
dami 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
dami acddca54cd update 2026-06-01 19:06:13 +08:00
dami 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
dami 468d6d7752 Update op_waf_index.py 2026-06-01 11:50:38 +08:00
dami f49d789411 update 2026-06-01 11:49:51 +08:00
dami 1f56115fbb update 2026-05-21 17:35:19 +08:00
dami 20d277102e Update install.sh 2026-05-21 11:08:06 +08:00
dami 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
dami 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
dami af880115ab update 2026-05-17 18:06:54 +08:00
dami e64ac8f616 Update info.json 2026-05-17 18:01:47 +08:00
dami a7d4206b77 update 2026-05-17 17:58:29 +08:00
dami 5a80690404 update 2026-05-17 17:55:47 +08:00
dami 9b0d71d4ac Update phplib.conf 2026-05-17 17:54:01 +08:00
dami 729f77d8db Update opcache.sh 2026-05-17 17:53:53 +08:00
dami 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
dami f4883ee708 Update webstats_index.py 2026-05-09 20:18:45 +08:00
dami 043fb739d9 Update index.py 2026-05-09 20:04:41 +08:00
dami b19aa8702b Update index.py 2026-05-09 20:01:39 +08:00
dami 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
dami 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
dami 21fce1f618 Update index.py 2026-05-07 19:05:07 +08:00
dami b5987b57ad Update task.py 2026-05-07 18:48:04 +08:00
dami e8c1cb08a7 update 2026-05-07 18:47:45 +08:00
dami 0de3a16898 Update index.py 2026-05-07 18:42:07 +08:00
dami 278bd7f38e Update debian.sh 2026-05-07 17:50:16 +08:00
dami 4a3b9db324 Update debian.sh 2026-05-07 17:47:48 +08:00
dami b3e8e96875 Update index.py 2026-05-07 17:06:56 +08:00
dami f5e50c6d76 Update index.py 2026-05-07 16:59:27 +08:00
dami c551c2ee1a Update index.py 2026-05-07 16:55:58 +08:00
dami 3fb8406e7b Update index.py 2026-05-07 16:53:30 +08:00
dami 50d12407c9 Update install.sh 2026-05-07 16:48:13 +08:00
dami 17931bb0ea Update install.sh 2026-05-07 16:48:03 +08:00
dami 6d30940920 Update index.py 2026-05-07 16:46:31 +08:00
dami 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
dami 9b7e9d4ffa update 2026-05-07 16:29:03 +08:00
dami c1a646c0d7 Merge branch 'master' into dev 2026-05-07 16:25:26 +08:00
dami 48ef0e7a65 Update index.py 2026-05-07 16:22:03 +08:00
dami 8dff306a91 Update index.py 2026-05-07 16:20:03 +08:00
dami a935acbc95 update 2026-05-07 16:12:16 +08:00
dami b1f9c99eb1 Update mw.tpl 2026-05-07 16:04:53 +08:00
dami 0851f749c3 Update mw.tpl 2026-05-07 15:57:20 +08:00
dami 3a7d9f84c7 Update install.sh 2026-05-07 15:22:12 +08:00
dami b43b35ccab Update install.sh 2026-05-07 15:21:29 +08:00
dami 5fc6eacc53 update 2026-05-07 15:11:09 +08:00
dami bd782362e8 update 2026-05-07 15:06:37 +08:00
dami 32151a176f update 2026-05-07 15:04:27 +08:00
dami f7c88d2086 update 2026-05-07 14:01:26 +08:00
dami 1eb76f2b90 update 2026-05-07 13:56:40 +08:00
dami 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
dami 15df77940e Update index.py 2026-05-07 12:09:57 +08:00
dami 9781516552 Update plugin.py 2026-05-07 12:05:18 +08:00
dami a23264a542 update 2026-05-07 12:03:23 +08:00
dami 0e7845985a Update install.sh 2026-05-07 11:51:06 +08:00
dami 93efe45347 Update install.sh 2026-05-07 11:40:52 +08:00
dami 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
dami 275f2515d6 优化 2026-05-01 19:17:05 +08:00
dami b4604928ec Update panel_task.py 2026-05-01 18:53:42 +08:00
dami 5a79b4021a update 2026-04-23 23:09:01 +08:00
dami 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
dami a430aaee97 Update index.py 2026-04-23 00:19:46 +08:00
dami f4ee2ca3b9 Update install.sh 2026-04-23 00:12:59 +08:00
dami 92b9212b31 update 2026-04-23 00:12:57 +08:00
dami 73656e60ff Update nginx.conf 2026-04-22 23:02:44 +08:00
dami 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
dami 85dcc4b78a update 2026-04-21 20:27:46 +08:00
dami 34a1bf7e28 Update mw.tpl 2026-04-15 20:33:51 +08:00
427 changed files with 10077 additions and 4391 deletions
+1 -1
View File
@@ -108,7 +108,7 @@ docker run -itd --name mw-server --privileged=true -p 7200:7200 -p 80:80 -p 443:
```
### 版本更新 0.18.5
### 版本更新 0.18.6
- 常规优化。
+2 -1
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()
+1 -1
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)
+3 -3
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
+1 -1
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'
+5 -5
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
+1 -1
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未运行,正在启动服务..."
+1 -1
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'
+4 -4
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
+6 -6
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
+1 -1
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
+1 -1
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未运行,正在启动服务..."
+1 -1
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)
+3 -3
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
+5 -5
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
#初始化
+5 -4
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
+1
View File
@@ -165,6 +165,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):
+2 -2
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
+1 -1
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'
+5 -5
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
@@ -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
@@ -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
@@ -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("任务开始")
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
+1 -1
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
'''
+1 -1
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
'''
@@ -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
@@ -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
@@ -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
+2 -2
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
+1 -1
View File
@@ -26,7 +26,7 @@ Uninstall_App()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_App
else
Uninstall_App
+4 -4
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
+3 -3
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
@@ -95,7 +95,7 @@ Uninstall_App()
action=$1
version=$2
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_App $version
else
Uninstall_App $version
+3 -3
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
+1 -1
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'
+5 -5
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
+1 -1
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:
+1 -1
View File
@@ -67,7 +67,7 @@ Uninstall_App()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_App
else
Uninstall_App
+6 -6
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
+6 -6
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
@@ -25,11 +25,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 +66,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
@@ -119,7 +119,7 @@ Uninstall_App()
action=$1
version=$2
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_App $version
else
Uninstall_App $version
+3 -3
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'
@@ -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
+1 -1
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] == '':
+5 -5
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
+1 -1
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'
+1 -1
View File
@@ -28,7 +28,7 @@ if [ "macos" == "$OSNAME" ];then
fi
if [ -f ${rootPath}/bin/activate ];then
source ${rootPath}/bin/activate
. ${rootPath}/bin/activate
fi
if id grafana &> /dev/null ;then
+4 -4
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
+3 -3
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}
+3 -3
View File
@@ -31,7 +31,7 @@ Install_App()
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
@@ -94,7 +94,7 @@ Uninstall_App()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_App
else
Uninstall_App
+5 -5
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
+5 -5
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
+1 -1
View File
@@ -10,7 +10,7 @@ serverPath=$(dirname "$rootPath")
action=$1
type=$2
if [ "${2}" == "" ];then
if [ "${2}" = "" ];then
echo '缺少安装脚本...'
exit 0
fi
+3 -3
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
+1 -1
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'
+1 -1
View File
@@ -91,7 +91,7 @@ Uninstall_App()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_App
else
Uninstall_App
+1 -1
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 ."
+4 -4
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
+1 -1
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'
+1 -1
View File
@@ -38,7 +38,7 @@ Uninstall_App()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_App
else
Uninstall_App
+1 -1
View File
@@ -37,7 +37,7 @@ Uninstall_App()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_App
else
Uninstall_App
+1 -1
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'
+4 -4
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
+7 -7
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
+3 -3
View File
@@ -16,18 +16,18 @@ sysArch=`arch`
# 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 [ "$?" = "0" ];then
sh -x $curPath/versions/apt/install.sh $1 $2
fi
which yum
if [ "$?" == "0" ];then
if [ "$?" = "0" ];then
sh -x $curPath/versions/yum/install.sh $1 $2
fi
@@ -10,7 +10,7 @@ sysName=`uname`
sysArch=`arch`
if [ -f ${rootPath}/bin/activate ];then
source ${rootPath}/bin/activate
. ${rootPath}/bin/activate
fi
VERSION=$2
@@ -11,7 +11,7 @@ sysArch=`arch`
if [ -f ${rootPath}/bin/activate ];then
source ${rootPath}/bin/activate
. ${rootPath}/bin/activate
fi
VERSION=$2
@@ -60,7 +60,7 @@ Uninstall_App()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_App
else
Uninstall_App
+7 -8
View File
@@ -585,8 +585,7 @@ def setMyDbPos():
mw.writeFile(myfile, mycnf)
start()
result = mw.execShell(
'ps aux|grep mysqld| grep -v grep|grep -v python')
result = mw.execShell('ps -ef|grep mysqld| grep -v grep|grep -v python')
if len(result[0]) > 10:
mw.writeFile('data/datadir.pl', t_datadir)
return mw.returnJson(True, '存储目录迁移成功!')
@@ -879,7 +878,7 @@ def importDbExternalProgress():
file = args['file']
name = args['name']
cmd = 'cd '+mw.getServerDir()+'/mdserver-web && source bin/activate && '
cmd = 'cd '+mw.getServerDir()+'/mdserver-web && . bin/activate && '
cmd += 'python3 '+mw.getServerDir()+'/mdserver-web/plugins/mariadb/index.py import_db_external_progress_bar {"file":"'+file+'","name":"'+name+'"}'
return mw.returnJson(True, 'ok',cmd)
@@ -2602,7 +2601,7 @@ def initSlaveStatusSSH(version=''):
username='root', pkey=key)
db_user = data['db_user']
cmd = 'cd /www/server/mdserver-web && source bin/activate && python3 plugins/mariadb/index.py get_master_rep_slave_user_cmd_ssh {"username":"' + db_user + '","db":""}'
cmd = 'cd /www/server/mdserver-web && . bin/activate && python3 plugins/mariadb/index.py get_master_rep_slave_user_cmd_ssh {"username":"' + db_user + '","db":""}'
stdin, stdout, stderr = ssh.exec_command(cmd)
result = stdout.read()
result = result.decode('utf-8')
@@ -2754,7 +2753,7 @@ def syncDatabaseRepairLog(version=''):
sync_args_sign = args['sign']
op = args['op']
tmp_log = syncDatabaseRepairTempFile()
cmd = 'cd '+mw.getServerDir()+'/mdserver-web && source bin/activate && python3 plugins/mariadb/index.py sync_database_repair {"db":"'+sync_args_db+'","sign":"'+sync_args_sign+'"}'
cmd = 'cd '+mw.getServerDir()+'/mdserver-web && . bin/activate && python3 plugins/mariadb/index.py sync_database_repair {"db":"'+sync_args_db+'","sign":"'+sync_args_sign+'"}'
# print(cmd)
if op == 'get':
@@ -3063,7 +3062,7 @@ def fullSyncCmd():
db = args['db']
sign = args['sign']
cmd = 'cd '+mw.getServerDir()+'/mdserver-web && source bin/activate && python3 plugins/mariadb/index.py do_full_sync {"db":"'+db+'","sign":"'+sign+'"}'
cmd = 'cd '+mw.getServerDir()+'/mdserver-web && . bin/activate && python3 plugins/mariadb/index.py do_full_sync {"db":"'+db+'","sign":"'+sign+'"}'
return mw.returnJson(True,'ok',cmd)
# python3 plugins/mariadb/index.py do_full_sync {"db":"demo1","sign":"","beigin":"1"}
@@ -3248,7 +3247,7 @@ def doFullSyncSSH(version=''):
writeDbSyncStatus({'code': 0, 'msg': '登录Master成功...', 'progress': 5})
dbname = args['db']
cmd = "cd /www/server/mdserver-web && source bin/activate && python3 plugins/mariadb/index.py dump_mysql_data {\"db\":'" + dbname + "'}"
cmd = "cd /www/server/mdserver-web && . bin/activate && python3 plugins/mariadb/index.py dump_mysql_data {\"db\":'" + dbname + "'}"
print(cmd)
stdin, stdout, stderr = ssh.exec_command(cmd)
result = stdout.read()
@@ -3271,7 +3270,7 @@ def doFullSyncSSH(version=''):
if copy_status == None:
writeDbSyncStatus({'code': 2, 'msg': '数据同步本地完成...', 'progress': 40})
cmd = 'cd /www/server/mdserver-web && source bin/activate && python3 plugins/mariadb/index.py get_master_rep_slave_user_cmd {"username":"' + db_user + '","db":""}'
cmd = 'cd /www/server/mdserver-web && . bin/activate && python3 plugins/mariadb/index.py get_master_rep_slave_user_cmd {"username":"' + db_user + '","db":""}'
stdin, stdout, stderr = ssh.exec_command(cmd)
result = stdout.read()
result = result.decode('utf-8')
+8 -8
View File
@@ -8,11 +8,11 @@ rootPath=$(dirname "$rootPath")
serverPath=$(dirname "$rootPath")
# cd /www/server/mdserver-web/plugins/mariadb && bash install.sh install 8.2
# cd /www/server/mdserver-web && source bin/activate && python3 plugins/mariadb/index.py try_slave_sync_bugfix {}
# cd /www/server/mdserver-web && source bin/activate && python3 plugins/mariadb/index.py do_full_sync {"db":"xxx","sign":"","begin":1}
# cd /www/server/mdserver-web && source bin/activate && python3 plugins/mariadb/index.py sync_database_repair {"db":"xxx","sign":""}
# cd /www/server/mdserver-web && source bin/activate && python3 plugins/mariadb/index.py init_slave_status
# cd /www/server/mdserver-web && source bin/activate && python3 plugins/mariadb/index.py install_pre_inspection
# cd /www/server/mdserver-web && . bin/activate && python3 plugins/mariadb/index.py try_slave_sync_bugfix {}
# cd /www/server/mdserver-web && . bin/activate && python3 plugins/mariadb/index.py do_full_sync {"db":"xxx","sign":"","begin":1}
# cd /www/server/mdserver-web && . bin/activate && python3 plugins/mariadb/index.py sync_database_repair {"db":"xxx","sign":""}
# cd /www/server/mdserver-web && . bin/activate && python3 plugins/mariadb/index.py init_slave_status
# cd /www/server/mdserver-web && . bin/activate && python3 plugins/mariadb/index.py install_pre_inspection
action=$1
@@ -26,7 +26,7 @@ else
useradd -g mysql -s /usr/sbin/nologin mysql
fi
if [ "${2}" == "" ];then
if [ "${2}" = "" ];then
echo '缺少安装脚本...'
exit 0
fi
@@ -36,7 +36,7 @@ if [ ! -d $curPath/versions/$2 ];then
exit 0
fi
if [ "${action}" == "uninstall" ];then
if [ "${action}" = "uninstall" ];then
if [ -f /usr/lib/systemd/system/mariadb.service ] || [ -f /lib/systemd/system/mariadb.service ];then
systemctl stop mariadb
@@ -49,7 +49,7 @@ fi
sh -x $curPath/versions/$2/install.sh $1
if [ "${action}" == "install" ] && [ -d $serverPath/mariadb ];then
if [ "${action}" = "install" ] && [ -d $serverPath/mariadb ];then
#初始化
cd ${rootPath} && python3 ${rootPath}/plugins/mariadb/index.py start ${type}
cd ${rootPath} && python3 ${rootPath}/plugins/mariadb/index.py initd_install ${type}
+1 -1
View File
@@ -113,7 +113,7 @@ Uninstall_app()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_app
else
Uninstall_app
+2 -2
View File
@@ -71,7 +71,7 @@ Install_app()
INSTALL_CMD=cmake
CMAKE3=`which cmake3`
if [ "$?" == "0" ];then
if [ "$?" = "0" ];then
INSTALL_CMD=cmake3
fi
@@ -116,7 +116,7 @@ Uninstall_app()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_app
else
Uninstall_app
+1 -1
View File
@@ -103,7 +103,7 @@ Uninstall_app()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_app
else
Uninstall_app
+1 -1
View File
@@ -103,7 +103,7 @@ Uninstall_app()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_app
else
Uninstall_app
+1 -1
View File
@@ -113,7 +113,7 @@ Uninstall_app()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_app
else
Uninstall_app
+1 -1
View File
@@ -113,7 +113,7 @@ Uninstall_app()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_app
else
Uninstall_app
+1 -1
View File
@@ -113,7 +113,7 @@ Uninstall_app()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_app
else
Uninstall_app
+1 -1
View File
@@ -113,7 +113,7 @@ Uninstall_app()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_app
else
Uninstall_app
+1 -1
View File
@@ -113,7 +113,7 @@ Uninstall_app()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_app
else
Uninstall_app
+1 -1
View File
@@ -113,7 +113,7 @@ Uninstall_app()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_app
else
Uninstall_app
+1 -1
View File
@@ -113,7 +113,7 @@ Uninstall_app()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_app
else
Uninstall_app
+1 -1
View File
@@ -113,7 +113,7 @@ Uninstall_app()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_app
else
Uninstall_app
+1 -1
View File
@@ -113,7 +113,7 @@ Uninstall_app()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_app
else
Uninstall_app
+1 -1
View File
@@ -113,7 +113,7 @@ Uninstall_app()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_app
else
Uninstall_app
+1 -1
View File
@@ -113,7 +113,7 @@ Uninstall_app()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_app
else
Uninstall_app
+1 -1
View File
@@ -96,7 +96,7 @@ def checkArgs(data, ck=[]):
def status():
cmd = "ps aux|grep " + getPluginName() + " |grep -v grep | grep -v mdserver-web | awk '{print $2}'"
cmd = "ps -ef|grep " + getPluginName() + " |grep -v grep | grep -v mdserver-web | awk '{print $2}'"
# print(cmd)
data = mw.execShell(cmd)
# print(data)
+3 -3
View File
@@ -8,7 +8,7 @@ rootPath=$(dirname "$rootPath")
serverPath=$(dirname "$rootPath")
sys_os=`uname`
VERSION=1.6.39
VERSION=1.6.42
echo $sys_os
@@ -24,7 +24,7 @@ Install_mem(){
cd $serverPath/source/memcached && tar -zxvf memcached.tar.gz
OPTIONS=''
if [ ${sys_os} == "Darwin" ]; then
if [ ${sys_os} = "Darwin" ]; then
LIB_DEPEND_DIR=`brew info libevent | grep /opt/homebrew/Cellar/libevent | cut -d \ -f 1 | awk 'END {print}'`
OPTIONS="${OPTIONS} --with-libevent=${LIB_DEPEND_DIR}"
fi
@@ -68,7 +68,7 @@ Uninstall_mem()
# /www/server/memcached/bin/memcached -d -p 11211 -u root -m 100 -c 100
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_mem
else
Uninstall_mem
+3 -3
View File
@@ -98,7 +98,7 @@ class classApi:
os.remove(log_file)
plugins_dir = mw.getServerDir() + '/mdserver-web'
exe = "cd {0} && source bin/activate && python3 plugins/migration_api/index.py bg_process &>{1} &".format(
exe = "cd {0} && . bin/activate && python3 plugins/migration_api/index.py bg_process &>{1} &".format(
plugins_dir, log_file_error)
# mw.execShell(exe)
# os.system(exe)
@@ -230,7 +230,7 @@ class classApi:
def close_sync(self, args):
# 取消迁移
mw.execShell("kill -9 {}".format(self.get_pid()))
mw.execShell("kill -9 $(ps aux|grep index.py|grep -v grep|awk '{print $2}')")
mw.execShell("kill -9 $(ps -ef|grep index.py|grep -v grep|awk '{print $2}')")
# 删除迁移配置
time.sleep(1)
if os.path.exists(self._INFO_FILE):
@@ -1032,7 +1032,7 @@ def stepThree():
def getPid():
cmd = "ps aux|grep 'plugins/migration_api/index.py bg_process' |grep -v grep|awk '{print $2}'|xargs"
cmd = "ps -ef|grep 'plugins/migration_api/index.py bg_process' |grep -v grep|awk '{print $2}'|xargs"
result = mw.execShell(cmd)[0].strip()
if not result:
return None
+2 -2
View File
@@ -9,7 +9,7 @@ rootPath=$(dirname "$rootPath")
serverPath=$(dirname "$rootPath")
# cd /www/server/mdserver-web && source bin/activate && python3 plugins/migration_api/index.py bg_process
# cd /www/server/mdserver-web && . bin/activate && python3 plugins/migration_api/index.py bg_process
VERSION=1.0
@@ -25,7 +25,7 @@ Uninstall_App()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_App
else
Uninstall_App
+49 -17
View File
@@ -154,8 +154,8 @@ def checkArgs(data, ck=[]):
return (True, mw.returnJson(True, 'ok'))
def status():
data = mw.execShell(
"ps -ef|grep mongod |grep -v mongosh|grep -v grep | grep -v /Applications | grep -v python | grep -v mdserver-web | awk '{print $2}'")
cmd = "ps -ef|grep mongod |grep -v mongosh|grep -v grep | grep -v /Applications | grep -v python | grep -v mdserver-web | awk '{print $2}'"
data = mw.execShell(cmd)
if data[0] == '':
return 'stop'
return 'start'
@@ -196,25 +196,55 @@ def mongdbClientS():
mg_root = pSqliteDb('config').where('id=?', (1,)).getField('mg_root')
if auth == 'disabled':
client = pymongo.MongoClient(host=ip, port=int(port), directConnection=True)
client = pymongo.MongoClient(host=ip, port=int(port))
else:
# print(auth,mg_root)
client = pymongo.MongoClient(host=ip, port=int(port), directConnection=True, username='root',password=mg_root)
# 使用 admin 数据库进行认证,兼容 MongoDB 3.0
client = pymongo.MongoClient(host=ip, port=int(port), username='root', password=mg_root, authSource='admin')
return client
def getMongoDBVersion():
'''获取MongoDB版本号'''
import pymongo
port = getConfPort()
ip = getConfLocalIp()
try:
# 先不使用认证连接
client = pymongo.MongoClient(host=ip, port=int(port), serverSelectionTimeoutMS=5000)
db = client.admin
serverStatus = db.command('serverStatus')
version = serverStatus.get('version', '4.0')
client.close()
return version
except Exception as e:
# 如果无法获取版本,默认返回 4.0(新版本兼容模式)
return '4.0'
def isMongoDB3x():
'''判断是否为MongoDB 3.x版本'''
version = getMongoDBVersion()
# 匹配 3.x 版本
if version.startswith('3.'):
return True
return False
def mongdbClient():
import pymongo
port = getConfPort()
auth = getConfAuth()
ip = getConfLocalIp()
mg_root = pSqliteDb('config').where('id=?', (1,)).getField('mg_root')
# print(ip,port,auth,mg_root)
if auth == 'disabled':
client = pymongo.MongoClient(host=ip, port=int(port), directConnection=True)
client = pymongo.MongoClient(host=ip, port=int(port))
else:
# uri = "mongodb://root:"+mg_root+"@127.0.0.1:"+str(port)
# client = pymongo.MongoClient(uri)
client = pymongo.MongoClient(host=ip, port=int(port), directConnection=True, username='root',password=mg_root)
# 根据MongoDB版本选择认证方式
if isMongoDB3x():
# MongoDB 3.x 使用 authSource 指定认证数据库
client = pymongo.MongoClient(host=ip, port=int(port), username='root', password=mg_root, authSource='admin')
else:
# MongoDB 4.x+ 默认在 admin 数据库认证
client = pymongo.MongoClient(host=ip, port=int(port), username='root', password=mg_root)
return client
@@ -435,7 +465,7 @@ def setConfigAuth():
def runInfo():
'''
cd /www/server/mdserver-web && source bin/activate && python3 /www/server/mdserver-web/plugins/mongodb/index.py run_info
cd /www/server/mdserver-web && . bin/activate && python3 /www/server/mdserver-web/plugins/mongodb/index.py run_info
'''
client = mongdbClient()
db = client.admin
@@ -711,7 +741,6 @@ def setRootPwd(version=''):
def setUserPwd(version=''):
client = mongdbClient()
db = client.admin
sqlite_db = pSqliteDb('databases')
args = getArgs()
@@ -724,6 +753,8 @@ def setUserPwd(version=''):
uid = args['id']
try:
name = sqlite_db.where('id=?', (uid,)).getField('name')
# 将用户创建在目标数据库中,而不是 admin 数据库
db = client[name]
user_roles = [{'role': 'dbOwner', 'db': name}, {'role': 'userAdmin', 'db': name}]
try:
@@ -824,16 +855,16 @@ def getDbInfo():
def toDbBase(find):
client = mongdbClient()
db_admin = client.admin
data_name = find['name']
db = client[data_name]
db.zchat.insert_one({})
user_roles = [{'role': 'dbOwner', 'db': data_name}, {'role': 'userAdmin', 'db': data_name}]
# 将用户创建在目标数据库中,而不是 admin 数据库
try:
db_admin.command("createUser", find['username'], pwd=find['password'], roles=user_roles)
db.command("createUser", find['username'], pwd=find['password'], roles=user_roles)
except Exception as e:
db_admin.command("updateUser", find['username'], pwd=find['password'], roles=user_roles)
db.command("updateUser", find['username'], pwd=find['password'], roles=user_roles)
return 1
def syncToDatabases():
@@ -990,7 +1021,8 @@ def setDbAccess():
user_roles.append(t)
client = mongdbClient()
db = client.admin
# 在目标数据库中操作用户,而不是 admin 数据库
db = client[name]
try:
db.command("updateUser", username, pwd=mg_pass, roles=user_roles)
@@ -1419,7 +1451,7 @@ def importDbBackup():
def testData():
'''
cd /www/server/mdserver-web && source bin/activate && python3 /www/server/mdserver-web/plugins/mongodb/index.py test_data
cd /www/server/mdserver-web && . bin/activate && python3 /www/server/mdserver-web/plugins/mongodb/index.py test_data
'''
import pymongo
from pymongo import ReadPreference
@@ -1438,7 +1470,7 @@ def testData():
def test():
'''
python3 /www/server/mdserver-web/plugins/mongodb/index.py set_config_auth {}
cd /www/server/mdserver-web && source bin/activate && python3 /www/server/mdserver-web/plugins/mongodb/index.py test
cd /www/server/mdserver-web && . bin/activate && python3 /www/server/mdserver-web/plugins/mongodb/index.py test
python3 plugins/mongodb/index.py test
'''
# https://pymongo.readthedocs.io/en/stable/examples/high_availability.html
+1 -1
View File
@@ -7,7 +7,7 @@
"shell": "install.sh",
"install_pre_inspection":true,
"uninstall_pre_inspection":true,
"versions":["4.4","5.0","6.0","7.0","8.0","8.2"],
"versions":["3.0","4.4","5.0","6.0","7.0","8.0","8.2"],
"tip": "soft",
"checks": "server/mongodb",
"path": "server/mongodb",
+18 -18
View File
@@ -23,9 +23,9 @@ SYS_VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | a
Install_app_mac()
{
mkdir -p $serverPath/mongodb
if [ "$VERSION" == "5.0" ];then
if [ "$VERSION" = "5.0" ];then
G_VERSION="5.0.11"
elif [[ "$VERSION" == "4.4" ]]; then
elif [[ "$VERSION" = "4.4" ]]; then
G_VERSION="4.4.11"
fi
@@ -41,7 +41,7 @@ Install_app_mac()
Install_Linux_Ubuntu()
{
##################### Ubuntu start #####################
if [ "$SYS_VERSION_ID" == "22" ]; then
if [ "$SYS_VERSION_ID" = "22" ]; then
echo "Not yet supported"
exit 1
fi
@@ -52,11 +52,11 @@ fi
echo $SYS_VERSION_ID
SOURCE_NAME=bionic
if [ "$SYS_VERSION_ID" == "18.04" ];then
if [ "$SYS_VERSION_ID" = "18.04" ];then
SOURCE_NAME=bionic
elif [ "$SYS_VERSION_ID" == "16.04" ];then
elif [ "$SYS_VERSION_ID" = "16.04" ];then
SOURCE_NAME=xenial
elif [ "$SYS_VERSION_ID" == "20.04" ];then
elif [ "$SYS_VERSION_ID" = "20.04" ];then
SOURCE_NAME=focal
fi
@@ -210,13 +210,13 @@ rm -rf /etc/yum.repos.d/mongodb-org-${VERSION}.repo
Install_app_linux()
{
if [ "$OSNAME" == "ubuntu" ];then
if [ "$OSNAME" = "ubuntu" ];then
Install_Linux_Ubuntu
elif [ "$OSNAME" == "debian" ];then
elif [ "$OSNAME" = "debian" ];then
Install_Linux_Debian
elif [ "$OSNAME" == "centos" ];then
elif [ "$OSNAME" = "centos" ];then
Install_Linux_CentOS
elif [ "$OSNAME" == "opensuse" ];then
elif [ "$OSNAME" = "opensuse" ];then
Install_Linux_Opensuse
else
echo "Not yet supported"
@@ -230,13 +230,13 @@ Install_app()
echo '正在安装脚本文件...'
mkdir -p $serverPath/source
if [ "macos" == "$OSNAME" ];then
if [ "macos" = "$OSNAME" ];then
Install_app_mac
else
Install_app_linux
fi
if [ "$?" == "0" ];then
if [ "$?" = "0" ];then
mkdir -p $serverPath/mongodb
echo "${VERSION}" > $serverPath/mongodb/version.pl
echo '安装完成'
@@ -252,13 +252,13 @@ Install_app()
Uninstall_app_linux()
{
##################
if [ "$OSNAME" == "ubuntu" ];then
if [ "$OSNAME" = "ubuntu" ];then
Uninstall_Linux_Ubuntu
elif [ "$OSNAME" == "debian" ];then
elif [ "$OSNAME" = "debian" ];then
Uninstall_Linux_Debian
elif [ "$OSNAME" == "centos" ];then
elif [ "$OSNAME" = "centos" ];then
Uninstall_Linux_CentOS
elif [ "$OSNAME" == "opensuse" ];then
elif [ "$OSNAME" = "opensuse" ];then
Uninstall_Linux_Opensuse
else
echo "ok"
@@ -268,7 +268,7 @@ fi
Uninstall_app()
{
if [ "macos" == "$OSNAME" ];then
if [ "macos" = "$OSNAME" ];then
echo 'mac'
else
Uninstall_app_linux
@@ -279,7 +279,7 @@ Uninstall_app()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_app
else
Uninstall_app
+2 -2
View File
@@ -79,7 +79,7 @@ Install_app()
--ssl=off CPPPATH=$serverPath/lib/openssl/include \
LIBPATH=$serverPath/lib/openssl/lib"
if [ "$?" == "0" ];then
if [ "$?" = "0" ];then
mkdir -p $serverPath/mongodb
echo "${VERSION}" > $serverPath/mongodb/version.pl
echo '安装完成'
@@ -99,7 +99,7 @@ Uninstall_app()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_app
else
Uninstall_app
+27 -23
View File
@@ -6,9 +6,21 @@ export PATH
# cd /Users/midoks/Desktop/mwdev/server/mdserver-web/plugins/mongodb && /bin/bash install.sh install 7.0
# cd /www/server/mdserver-web/plugins/mongodb && /bin/bash install.sh install 7.0
# cd /www/server/mdserver-web/plugins/mongodb && /bin/bash install.sh install 8.0
# cd /www/server/mdserver-web/plugins/mongodb && /bin/bash install.sh install 3.0
# cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/mongodb/index.py start
# db.createUser({
# user: "demo",
# pwd: "123123",
# roles: [{role: "dbOwner", db: "demo"}]
# })
# db.auth("demo", "123123");
# import
# /www/server/mongodb/bin/mongorestore -h localhost -d demo --dir /tmp/*.json
curPath=`pwd`
rootPath=$(dirname "$curPath")
@@ -31,45 +43,30 @@ if [ "macos" != "$OSNAME" ];then
fi
if [ -f ${rootPath}/bin/activate ];then
source ${rootPath}/bin/activate
. ${rootPath}/bin/activate
fi
Install_app()
{
echo '正在安装脚本文件...'
mkdir -p $serverPath/source
# if id mongodb &> /dev/null ;then
# echo "mongodb uid is `id -u mongodb`"
# echo "mongodb shell is `grep "^mongodb:" /etc/passwd |cut -d':' -f7 `"
# else
# groupadd mongodb
# useradd -g mongodb mongodb
# fi
# if [ "centos" == "$OSNAME" ];then
# OSNAME=rhel
# fi
# if [ "fedora" == "$OSNAME" ];then
# OSNAME=rhel
# fi
# if [ "rocky" == "$OSNAME" ];then
# OSNAME=rhel
# fi
cd ${rootPath}/plugins/php/lib && /bin/bash openssl_11.sh
shell_file=${curPath}/versions/${VERSION}/${OSNAME}.sh
if [ -f $shell_file ];then
bash -x $shell_file
if [ "$?" != "0" ];then
echo '不支持...'
exit 1
fi
else
echo '不支持...'
exit 1
fi
if [ "$?" == "0" ];then
if [ "$?" = "0" ];then
mkdir -p $serverPath/mongodb
echo "${VERSION}" > $serverPath/mongodb/version.pl
echo 'mongodb安装完成'
@@ -78,6 +75,13 @@ Install_app()
cd ${rootPath} && python3 ${rootPath}/plugins/mongodb/index.py start
cd ${rootPath} && python3 ${rootPath}/plugins/mongodb/index.py initd_install
fi
if [ "${VERSION}" = "3.0" ];then
# 降低版本
pip install pymongo==3.12.0
else
pip install pymongo
fi
}
Uninstall_app()
@@ -98,7 +102,7 @@ Uninstall_app()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_app
else
Uninstall_app

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