From eef942c155cb4f21d27a782b438494e7a40bf3b6 Mon Sep 17 00:00:00 2001 From: Bai Date: Wed, 15 Jul 2020 16:07:47 +0800 Subject: [PATCH] =?UTF-8?q?fix(gather=5Fasset=5Fusers):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E6=94=B6=E9=9B=86=E8=B5=84=E4=BA=A7=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E4=B8=AD=E7=94=A8=E6=88=B7=E5=90=8D=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=B8=8D=E5=AE=8C=E6=95=B4=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/assets/tasks/const.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/assets/tasks/const.py b/apps/assets/tasks/const.py index ce9ad9074..51f92bd51 100644 --- a/apps/assets/tasks/const.py +++ b/apps/assets/tasks/const.py @@ -64,7 +64,7 @@ GATHER_ASSET_USERS_TASKS = [ "action": { "module": "shell", "args": "users=$(getent passwd | grep -v 'nologin' | " - "grep -v 'shudown' | awk -F: '{ print $1 }');for i in $users;do last -F $i -1 | " + "grep -v 'shudown' | awk -F: '{ print $1 }');for i in $users;do last -w -F $i -1 | " "head -1 | grep -v '^$' | awk '{ print $1\"@\"$3\"@\"$5,$6,$7,$8 }';done" } }