File: rush-notifier

package info (click to toggle)
rush 1.7%2Bdfsg-4
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 4,716 kB
  • ctags: 3,277
  • sloc: ansic: 7,729; sh: 4,985; perl: 297; makefile: 113; awk: 37; sed: 24
file content (32 lines) | stat: -rwxr-xr-x 581 bytes parent folder | download | duplicates (5)
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/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