From 707ed8fac6473124d3bd13a5a12fc3cfff6aebe0 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Wed, 18 Jan 2012 18:00:15 +0100 Subject: add notify-reboot and notify-users; change jabberwall to send messages Signed-off-by: Florian Pritz --- notify-users | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100755 notify-users (limited to 'notify-users') diff --git a/notify-users b/notify-users new file mode 100755 index 0000000..1b63037 --- /dev/null +++ b/notify-users @@ -0,0 +1,38 @@ +#!/bin/bash + +if [[ $# < 2 ]]; then + echo "usage: $(basename "$0") " + exit +fi + +server=$1 +subject=$2 + +send_mails() { + addr_file=$1 + subject=$2 + body=$3 + from="Florian Pritz " + + for addr in $(cat "$addr_file"); do + msmtp -t <