#!/bin/bash
#
# Notification mailer for GNU rush.
#
#   /usr/bin/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
