]> git.sur5r.net Git - bacula/bacula/blob - regress/scripts/cleanup
Backport from Bacula Enterprise
[bacula/bacula] / regress / scripts / cleanup
1 #!/bin/sh
2 #
3 # Copyright (C) 2000-2015 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
5 #
6 #
7 # Cleanup left over files -- both before and after test run
8 #
9 . scripts/functions
10 cwd=`pwd`
11 rm -rf ${tmp}/FileVolume*
12 rm -rf ${tmp}/TestVolume001 ${tmp}bacula-restores ${tmp}/Small*
13 rm -rf ${tmp}/sed_tmp ${tmp}/file-list
14 rm -rf ${tmp}/*
15 rm -rf ${working}/log ${tmp}/TEST-*
16 rm -rf ${working}/log ${tmp}/Backup-*
17 rm -rf ${working}/*.bsr ${working}/log*.sd
18 rm -rf ${working}/*.trace ${working}/*.traceback ${working}/*.lockdump 
19 rm -rf ${working}/@*
20 rm -rf ${tmp}disk-changer
21 rm -f ${cwd}/bin/plugins/test-plugin-fd.so
22 find . -name "gigaslam.gif" -exec rm -f {} \;
23
24
25 # bin directory does not always exist
26 if [ -d ${bin} ] ; then
27   if [ -f ${bin}/bacula ] ; then
28      ${bin}/bacula stop -KILL 2>&1 >/dev/null
29   fi
30   cd ${scripts}
31   ./drop_bacula_tables      >/dev/null 2>&1
32   ./make_bacula_tables      >/dev/null 2>&1
33   ./grant_bacula_privileges >/dev/null 2>&1
34   cd ${cwd}
35 fi
36
37 if [ x$USE_VTAPE = xyes ]; then
38    rm -rf ${working}/ach
39 fi