Compare commits

...

2 Commits

  1. 1
      plugins/sys-opt/index.html
  2. 7
      plugins/sys-opt/index.py

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

@ -122,12 +122,17 @@ def msgRunLog():
def cronRunLog():
if os.path.exists('/var/log/syslog.log'):
return '/var/log/syslog.log'
if os.path.exists('/var/log/syslog'):
return '/var/log/syslog'
return '/var/log/cron'
def systemRunLog():
return '/var/log/syslog'
def showHosts():
return '/etc/hosts'
if __name__ == "__main__":
func = sys.argv[1]
if func == 'status':
@ -154,5 +159,7 @@ if __name__ == "__main__":
print(cronRunLog())
elif func == 'sys_run_log':
print(systemRunLog())
elif func == 'hosts':
print(showHosts())
else:
print('err')

Loading…
Cancel
Save