루트 프로세스에서 사용자와 통신하는 방법

루트 프로세스에서 사용자와 통신하는 방법

cron.daily로그인한 사용자에게 결과를 보내야 하는 루트로 실행되는 프로세스가 있습니다 .

wall또는 와 유사한 X 버전이 있습니까 write? mail사용자에게 너무 복잡할 수 있으므로 이를 피하려고 합니다 .

세부 사항

저는 Windows 7을 사용하는 비기술적인 사용자를 위해 Linux Mint Cinnamon 노트북을 설정하고 있습니다. 바이러스 백신이 특별히 요청되었습니다.

스크립트는 cron.daily에 있습니다.

#!/bin/bash
# ClamAV antivirus maintenance.
LOGFILE=/var/log/av-results.txt

# Update the signature database. Populates the file /var/lib/clamav/daily.cvd
systemctl stop clamav-freshclam
freshclam
systemctl start clamav-freshclam

# Run a scan
clamscan --infected --recursive --log=$LOGFILE /home
if [[ $? -eq 1 ]]
then
    wall "Virus(es) found. Call support"
fi
chmod 666 $LOGFILE

하지만 wall사용자가 Cinnamon을 사용하지 않기 때문에 작동하지 않습니다 terminal.

ClamTK(GUI 버전 ClamAV)은 작동할 수 없기 때문에 제외되었습니다.

관련 정보