ルートプロセスでユーザーと通信する方法

ルートプロセスでユーザーと通信する方法

cron.dailyログインしたユーザーに結果を送信する必要があるルートとして実行されるプロセスがあります。

wallまたは同様のXバージョンがありますかwritemailユーザーにとって複雑すぎる可能性があるため、これを避けたいと思います。

詳細

私は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)は機能できないため除外されました。

ベストアンサー1

おすすめ記事