summaryrefslogtreecommitdiffstats
path: root/tools/mail_error
diff options
context:
space:
mode:
authorTon Voon <tonvoon@users.sourceforge.net>2003-03-24 02:57:50 (GMT)
committerTon Voon <tonvoon@users.sourceforge.net>2003-03-24 02:57:50 (GMT)
commitcea7506e69e5708e0df6d029e07d1626e6539379 (patch)
tree9b0beea60ce354fcf32d53dbaa007088d6fddeb7 /tools/mail_error
parent21c0dad0c5fc922e3228b4be9d9b803aa554fb1b (diff)
downloadmonitoring-plugins-cea7506e69e5708e0df6d029e07d1626e6539379.tar.gz
PATH set in correct place and extra comments
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@457 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'tools/mail_error')
-rwxr-xr-xtools/mail_error6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/mail_error b/tools/mail_error
index 184827e..71a08be 100755
--- a/tools/mail_error
+++ b/tools/mail_error
@@ -1,10 +1,12 @@
1#!/bin/bash 1#!/bin/bash
2# mail_error -o file -m email_address command 2# mail_error -o file -m email_address command
3# Runs command and redirects all output to file 3# Runs command from cron and redirects all output to file
4# If command rc != 0, sends file to email_address 4# If command rc != 0, sends output to email_address
5 5
6function die { echo $1 ; exit 1; } 6function die { echo $1 ; exit 1; }
7 7
8PATH=$HOME/bin:$HOME/local/bin:$PATH
9
8while getopts "o:m:" c; do 10while getopts "o:m:" c; do
9 case $c in 11 case $c in
10 o) output_file=$OPTARG;; 12 o) output_file=$OPTARG;;