系统优化加入hosts修改

This commit is contained in:
dami 2025-05-01 15:22:50 +08:00
parent 7a38224198
commit 7e3f40cb20
2 changed files with 6 additions and 0 deletions

View File

@ -6,6 +6,7 @@
<p onclick="pluginLogs('sys-opt','','sec_run_log', 20);">安全日志</p>
<p onclick="pluginLogs('sys-opt','','msg_run_log', 20);">常用日志</p>
<p onclick="pluginLogs('sys-opt','','cron_run_log', 20);">任务日志</p>
<p onclick="pluginConfig('sys-opt','','hosts');">HOSTS</p>
<p onclick="pluginRollingLogs('sys-opt','','sys_run_log', 20);">系统日志</p>
<p onclick="pRead()">说明</p>
</div>

View File

@ -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')