From 7e3f40cb2080d103acc397600e5a679bce4b8d2d Mon Sep 17 00:00:00 2001 From: dami Date: Thu, 1 May 2025 15:22:50 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E4=BC=98=E5=8C=96=E5=8A=A0?= =?UTF-8?q?=E5=85=A5hosts=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/sys-opt/index.html | 1 + plugins/sys-opt/index.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/plugins/sys-opt/index.html b/plugins/sys-opt/index.html index 369363bd2..5cafd566e 100755 --- a/plugins/sys-opt/index.html +++ b/plugins/sys-opt/index.html @@ -6,6 +6,7 @@

安全日志

常用日志

任务日志

+

HOSTS

系统日志

说明

diff --git a/plugins/sys-opt/index.py b/plugins/sys-opt/index.py index a9a66c583..9e77db40b 100755 --- a/plugins/sys-opt/index.py +++ b/plugins/sys-opt/index.py @@ -128,6 +128,9 @@ def cronRunLog(): def systemRunLog(): return '/var/log/syslog' +def showHosts(): + return '/etc/hosts' + if __name__ == "__main__": func = sys.argv[1] if func == 'status': @@ -154,5 +157,7 @@ if __name__ == "__main__": print(cronRunLog()) elif func == 'sys_run_log': print(systemRunLog()) + elif func == 'hosts': + print(showHosts()) else: print('err')