diff options
| author | Ton Voon <tonvoon@users.sourceforge.net> | 2003-03-24 02:57:50 +0000 |
|---|---|---|
| committer | Ton Voon <tonvoon@users.sourceforge.net> | 2003-03-24 02:57:50 +0000 |
| commit | cea7506e69e5708e0df6d029e07d1626e6539379 (patch) | |
| tree | 9b0beea60ce354fcf32d53dbaa007088d6fddeb7 | |
| parent | 21c0dad0c5fc922e3228b4be9d9b803aa554fb1b (diff) | |
| download | monitoring-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
| -rwxr-xr-x | tools/mail_error | 6 | ||||
| -rwxr-xr-x | tools/sfsnapshot | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/tools/mail_error b/tools/mail_error index 184827e9..71a08be5 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 | ||
| 6 | function die { echo $1 ; exit 1; } | 6 | function die { echo $1 ; exit 1; } |
| 7 | 7 | ||
| 8 | PATH=$HOME/bin:$HOME/local/bin:$PATH | ||
| 9 | |||
| 8 | while getopts "o:m:" c; do | 10 | while getopts "o:m:" c; do |
| 9 | case $c in | 11 | case $c in |
| 10 | o) output_file=$OPTARG;; | 12 | o) output_file=$OPTARG;; |
diff --git a/tools/sfsnapshot b/tools/sfsnapshot index 665285af..60b2cef9 100755 --- a/tools/sfsnapshot +++ b/tools/sfsnapshot | |||
| @@ -7,6 +7,8 @@ | |||
| 7 | # Assumes: | 7 | # Assumes: |
| 8 | # ssh setup to send to shell.sf.net and $CF without password prompt | 8 | # ssh setup to send to shell.sf.net and $CF without password prompt |
| 9 | # autconf and automake installed on shell cf at v 2.57 & 1.72 and in PATH | 9 | # autconf and automake installed on shell cf at v 2.57 & 1.72 and in PATH |
| 10 | # Install in cron with something like: | ||
| 11 | # 47 * * * * $HOME/bin/mail_error -o $HOME/sfsnapshot.out -m tonvoon@users.sf.net sfsnapshot r1_3_0 | ||
| 10 | 12 | ||
| 11 | function die { echo $1; exit 1; } | 13 | function die { echo $1; exit 1; } |
| 12 | 14 | ||
| @@ -53,7 +55,6 @@ function make_dist { | |||
| 53 | } | 55 | } |
| 54 | 56 | ||
| 55 | # Set working variables | 57 | # Set working variables |
| 56 | PATH=$HOME/local/bin:$PATH | ||
| 57 | PROJECT=nagiosplug | 58 | PROJECT=nagiosplug |
| 58 | IN=${HOME}/tmp_snapshot | 59 | IN=${HOME}/tmp_snapshot |
| 59 | OUT_SERVER="shell.sf.net" | 60 | OUT_SERVER="shell.sf.net" |
