From 89cd0fd2f6ba95fda7eced0a5ff9786253d8537b Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Tue, 23 Nov 2010 08:50:28 +0100 Subject: Ease testing: Just emit to screen if SMS_PHONE missing. --- sms.d/phone | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'sms.d/phone') diff --git a/sms.d/phone b/sms.d/phone index 69e8ad5..4e4ddd7 100755 --- a/sms.d/phone +++ b/sms.d/phone @@ -15,10 +15,19 @@ export smtp=mail.bitbase.dk export from=hp@fossasia.org export sender="$from" +# Send message (...just to stdout if invoking from cmdline) +sendit() { + if [ -n "$sms_phone" ]; then + mail -s "[sms] phone $sms_fromphone" hp@fossasia.org mb@fossasia.org + else + cat + fi +} + # Check keyword and break after processing if it matches case "$app" in phone) - cat <