3 # Copyright (C) 2000-2015 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
8 # test the reload and test command
10 TestName="reload-test"
23 $bin/bacula-dir -t $conf/bacula-dir.conf 2>&1 >> $tmp/testconf.log
26 print_debug "ERROR: Should detect error on bacula-dir.conf"
32 cat > $tmp/bcons <<EOF
36 cat $tmp/bcons | $bin/bconsole -c $conf/bconsole.conf 2>&1 | tee -a $tmp/reload.log
41 print_debug "ERROR: Bacula shouldn't die with a reload"
44 ls -l /proc/$pid/fd | grep bacula-dir.conf
47 print_debug "ERROR: Should not have bacula-dir.conf open"
54 $bin/bacula-dir -t $conf/bacula-dir.conf
57 print_debug "ERROR: Error on bacula-dir.conf"
60 $bin/bacula-ctl-dir start >/dev/null
61 pid=`cat $working/bacula-dir.$BASEPORT.pid`
63 echo "bacula-dir pid is $pid"
67 ls -l /proc/$pid/fd | grep bacula-dir.conf
70 print_debug "ERROR: Should not have bacula-dir.conf open"
76 # backup the configuration
77 cp $conf/bacula-dir.conf $tmp/1
78 cat >> $conf/bacula-dir.conf<<EOF
85 cp $tmp/1 $conf/bacula-dir.conf
86 cat >> $conf/bacula-dir.conf<<EOF
94 cp $tmp/1 $conf/bacula-dir.conf
95 cat >> $conf/bacula-dir.conf<<EOF
98 DIRport = 1101 # where we listen for UA connections
99 QueryFile = "/tmp/regress/bin/query.sql"
100 WorkingDirectory = "/tmp/regress/working"
101 PidDirectory = "/tmp/regress/working"
102 Maximum Concurrent Jobs = 1
103 Password = "xxx" # Console password
111 cp $tmp/1 $conf/bacula-dir.conf
112 cat >> $conf/bacula-dir.conf<<EOF
114 Name = "BackupClient1"
115 JobDefs = "DefaultJob"
116 Write Bootstrap = "/tmp/regress/working/Client1.bsr"
119 Name = "BackupClient1"
120 JobDefs = "DefaultJob"
121 Write Bootstrap = "/tmp/regress/working/Client1.bsr"
128 $bin/bacula-ctl-dir stop >/dev/null