3 # backup-script system for cloning systems using rsync
4 # Copyright (c)2008-2014 Alexander Barton, alex@barton.de
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
10 # Please read the file COPYING, README and AUTHORS for more information.
13 [ -n "$MAILTO" ] || MAILTO="logcheck"
17 TMP=`mktemp /tmp/$NAME.XXXXXXXX` || exit 11
19 PATH="$PATH:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
22 echo "$NAME Report" >$TMP
24 echo " - Host: `hostname -f`" >>$TMP
25 echo " - User: `id -un`" >>$TMP
28 `dirname "$0"`/backup-script $* >>$TMP 2>&1
30 cat $TMP | mail -s "$HOST: $NAME results" "$MAILTO"