#!/bin/sh # if test $# != 2 ; then echo "First arg must be email name" echo " and the second must be a tape drive" exit 1 fi out="/tmp/sed_tmp" cwd=`pwd` host=`hostname | tr '.' ' ' | cut -f 1 -d ' '` if test x$host = x ; then host=localhost fi # Create sed command script echo "s%@sbindir@%${cwd}/bin%g" >${out} echo "s%@scriptdir@%${cwd}/bin%g" >>${out} echo "s%@working_dir@%${cwd}/working%g" >>${out} echo "s%@piddir@%${cwd}/working%g" >>${out} echo "s%@subsysdir@%${cwd}/working%g" >>${out} echo "s%@job_email@%${1}%g" >>${out} echo "s%@tape_drive@%${2}%g" >>${out} echo "s%@tmpdir@%${cwd}/tmp%g" >>${out} echo "s%@hostname@%${host}%g" >>${out} # process .in files with sed script sed -f ${out} ${cwd}/scripts/test-bacula-dir.conf.in >${cwd}/scripts/test-bacula-dir.conf sed -f ${out} ${cwd}/scripts/testa-bacula-dir.conf.in >${cwd}/scripts/testa-bacula-dir.conf sed -f ${out} ${cwd}/scripts/test-bacula-fd.conf.in >${cwd}/scripts/test-bacula-fd.conf sed -f ${out} ${cwd}/scripts/test-bacula-sd.conf.in >${cwd}/scripts/test-bacula-sd.conf sed -f ${out} ${cwd}/scripts/test-console.conf.in >${cwd}/scripts/test-console.conf sed -f ${out} ${cwd}/scripts/bacula-dir-tape.conf.in >${cwd}/scripts/bacula-dir-tape.conf sed -f ${out} ${cwd}/scripts/bacula-sd-tape.conf.in >${cwd}/scripts/bacula-sd-tape.conf sed -f ${out} ${cwd}/scripts/cleanup-tape.in >${cwd}/scripts/cleanup-tape chmod 777 ${cwd}/scripts/cleanup-tape rm -f ${out}