From de80ca1013f45886ee60ad3203598f9c79633bf5 Mon Sep 17 00:00:00 2001 From: FSF BOFH Date: Mon, 22 Aug 2011 16:08:40 -0400 Subject: [PATCH] Take backup destination as an argument --- wizbackup-driver | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wizbackup-driver b/wizbackup-driver index 1709284..1a5d0bc 100755 --- a/wizbackup-driver +++ b/wizbackup-driver @@ -17,9 +17,9 @@ # along with this program. If not, see . # -if [ $# -lt 1 ] +if [ $# -lt 2 ] then - echo "Usage: $0 [MACHINE-TAB]" + echo "Usage: $0 [MACHINE-TAB] [DEST]" echo echo "The MACHINE-TAB file contains hostnames of machines to be backed up, one per line." echo "Empty lines and lines starting with '#' are ignored." @@ -27,12 +27,12 @@ then fi HOSTS=`cat $1 | egrep -v '^#|^ *$'` +DEST="$2" LOGGROUP=`basename $1` LOGDIR=/var/log/wizbackup LOCKDIR=/var/lock/wizbackup -DEST=/backup -EXCLUDES_DIR=$DEST/EXCLUDE +EXCLUDES_DIR="$DEST/EXCLUDE" today=`date +"%Y%m%d"` mkdir -p $LOGDIR -- 2.25.1