Take backup destination as an argument
authorFSF BOFH <sysadmin-nonrt@fsf.org>
Mon, 22 Aug 2011 20:08:40 +0000 (16:08 -0400)
committerFSF BOFH <sysadmin-nonrt@fsf.org>
Mon, 22 Aug 2011 20:08:40 +0000 (16:08 -0400)
wizbackup-driver

index 1709284a3e8469869acae708f07709d0e41bba2a..1a5d0bc8bb06f24b0233ba46f7d0219e27a87ceb 100755 (executable)
@@ -17,9 +17,9 @@
 #  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-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