1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
#!/bin/bash
#
# Notification mailer for GNU rush.
#
# /usr/sbin/rush-notifier
#
# The above path is used in the example file
#
# /usr/share/doc/rush/examples/rush.xinetd
#
read user command
#
# Full naming of sender and recipient.
#
/usr/sbin/sendmail -oi -t <<-TEXT
From: GNUrush daemon <root@$(hostname)>
To: Service registrar <root@localhost>
Subject: GNU rush notification.
The user $user has executed "$command".
TEXT
#
# Simplified naming.
#
#/usr/bin/mail -s "GNU rush notification." \
# root@localhost \
# <<-TEXT
# The user $user has executed "$command".
#TEXT
|