#!/bin/sh # # Run two jobs at the same time # cwd=`pwd` scripts/copy-tape-confs scripts/cleanup-tape echo "${cwd}/build" >/tmp/file-list echo " " echo " " echo " === Starting four-concurrent-jobs-tape at `date +%R:%S` ===" echo " === Starting four-concurrent-jobs-tape at `date +%R:%S` ===" >>working/log echo " " bin/bacula start 2>&1 >/dev/null bin/bconsole -c bin/bconsole.conf <&1 >/dev/null grep "^ Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null bstat=$? grep "^ Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null rstat=$? diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then echo " " echo " " echo " !!!!! four-concurrent-jobs-tape Bacula source failed!!! !!!!! " echo " !!!!! four-concurrent-jobs-tape failed!!! !!!!! " >>test.out echo " " exit 1 else echo " ===== four-concurrent-jobs-tape Bacula source OK ===== " echo " ===== four-concurrent-jobs-tape OK ===== " >>test.out scripts/cleanup exit 0 fi