From 1ad68ac29a04404b218e4b9c1326db8087e30103 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 23 Nov 2021 17:16:26 +0800 Subject: [PATCH] Update index.py --- plugins/clean/index.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/clean/index.py b/plugins/clean/index.py index 9c28b39ec..6fe96769c 100755 --- a/plugins/clean/index.py +++ b/plugins/clean/index.py @@ -129,13 +129,15 @@ def cleanLog(): print(i) mw.execShell(i) + # 常用日志 clogcom = [ "/var/log/messages", + "/var/log/btmp", + "/var/log/wtmp", ] - for i in clogcom: - print(i) - mw.execShell("echo \"\" > " + i) + if os.path.exists(i) + mw.execShell("echo \"\" > " + i) l = os.listdir(rootDir) for x in range(len(l)):