summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 21c0dad)
raw | patch | inline | side by side (parent: 21c0dad)
author | Ton Voon <tonvoon@users.sourceforge.net> | |
Mon, 24 Mar 2003 02:57:50 +0000 (02:57 +0000) | ||
committer | Ton Voon <tonvoon@users.sourceforge.net> | |
Mon, 24 Mar 2003 02:57:50 +0000 (02:57 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@457 f882894a-f735-0410-b71e-b25c423dba1c
tools/mail_error | patch | blob | history | |
tools/sfsnapshot | patch | blob | history |
diff --git a/tools/mail_error b/tools/mail_error
index 184827e92e24dba93e3779d83645b48408676ec9..71a08be55be0f1729a8ad503874ea6c39ae5bbff 100755 (executable)
--- a/tools/mail_error
+++ b/tools/mail_error
#!/bin/bash
# mail_error -o file -m email_address command
-# Runs command and redirects all output to file
-# If command rc != 0, sends file to email_address
+# Runs command from cron and redirects all output to file
+# If command rc != 0, sends output to email_address
function die { echo $1 ; exit 1; }
+PATH=$HOME/bin:$HOME/local/bin:$PATH
+
while getopts "o:m:" c; do
case $c in
o) output_file=$OPTARG;;
diff --git a/tools/sfsnapshot b/tools/sfsnapshot
index 665285af29eeced2d7038779ee5a608e7e6805ae..60b2cef9e22b4355226ea21d9f9b93854174e7e7 100755 (executable)
--- a/tools/sfsnapshot
+++ b/tools/sfsnapshot
# Assumes:
# ssh setup to send to shell.sf.net and $CF without password prompt
# autconf and automake installed on shell cf at v 2.57 & 1.72 and in PATH
+# Install in cron with something like:
+# 47 * * * * $HOME/bin/mail_error -o $HOME/sfsnapshot.out -m tonvoon@users.sf.net sfsnapshot r1_3_0
function die { echo $1; exit 1; }
}
# Set working variables
-PATH=$HOME/local/bin:$PATH
PROJECT=nagiosplug
IN=${HOME}/tmp_snapshot
OUT_SERVER="shell.sf.net"