diff --git a/evocheck.sh b/evocheck.sh index 4f24ae7..f72d21d 100755 --- a/evocheck.sh +++ b/evocheck.sh @@ -907,6 +907,15 @@ check_log2mailsystemdunit() { && failed "IS_LOG2MAILSYSTEMDUNIT" "/etc/init.d/log2mail may be deleted (use systemd unit)" fi } +check_systemduserunit() { + if is_debian_jessie || is_debian_stretch || is_debian_buster || is_debian_bullseye; then + awk 'BEGIN { FS = ":" } { print $1, $6 }' /etc/passwd | while read -r user dir; do + if ls "${dir}"/.config/systemd/user/*.service > /dev/null 2> /dev/null; then + failed "IS_SYSTEMDUSERUNIT" "systemd unit found for user ${user}" + fi + done + fi +} check_listupgrade() { test -f /etc/cron.d/listupgrade \ || failed "IS_LISTUPGRADE" "missing listupgrade cron" @@ -1599,6 +1608,7 @@ main() { test "${IS_BROADCOMFIRMWARE:=1}" = 1 && check_broadcomfirmware test "${IS_HARDWARERAIDTOOL:=1}" = 1 && check_hardwareraidtool test "${IS_LOG2MAILSYSTEMDUNIT:=1}" = 1 && check_log2mailsystemdunit + test "${IS_SYSTEMDUSERUNIT:=1}" = 1 && check_systemduserunit test "${IS_LISTUPGRADE:=1}" = 1 && check_listupgrade test "${IS_MARIADBEVOLINUXCONF:=0}" = 1 && check_mariadbevolinuxconf test "${IS_SQL_BACKUP:=1}" = 1 && check_sql_backup