fix: replace lastlog2 with lastlog for SSH login information and clean up related dependencies
Some checks failed
Nix Format Check / check-format (push) Failing after 38s

This commit is contained in:
2025-03-10 20:28:05 +01:00
parent ee064f521b
commit 132b7b1b66
4 changed files with 5 additions and 4 deletions

View File

@@ -12,8 +12,7 @@ from helpers.functions import printfe, logo, _rainbow_color, COLORS
def get_last_ssh_login():
"""Get information about the last SSH login"""
try:
# Using lastlog2 to get the last login information
result = subprocess.run(['lastlog2', '-u', os.environ.get("USER", "")],
result = subprocess.run(['lastlog', '-u', os.environ.get("USER", "")],
capture_output=True, text=True)
if result.returncode == 0:
lines = result.stdout.strip().split('\n')