]> git.sur5r.net Git - bacula/bacula/blob - regress/scripts/pretest
regress: add remote control functions
[bacula/bacula] / regress / scripts / pretest
1 #!/bin/sh
2 #
3 #  Test if daemons start
4 #
5
6 TestName="pretest"
7 JobName=backup
8 error=0
9
10 . scripts/functions
11
12 copy_test_confs
13
14
15 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
16 messages
17 quit
18 END_OF_DATA
19
20 start_test
21
22 run_bacula
23 if [ $? -ne 0 ]; then
24    echo "Error: Starting Bacula Failed in pretest"
25    make distclean
26    make setup
27    exit 1
28 fi
29
30 bin/bacula-ctl-dir status >/dev/null
31 if [ $? -ne 0 ]; then
32    echo "Error: bacula-dir failed to start"
33    make distclean
34    make setup
35    exit 1
36 fi
37
38 bin/bacula-ctl-fd status >/dev/null
39 if [ $? -ne 0 ]; then
40    echo "Error: bacula-fd failed to start"
41    make distclean
42    make setup
43    exit 1
44 fi
45
46 bin/bacula-ctl-sd status >/dev/null
47 if [ $? -ne 0 ]; then
48    echo "Error: bacula-sd failed to start"
49    make distclean
50    make setup
51    exit 1
52 fi
53
54 stop_bacula
55
56 dstat=0
57 bstat=$error
58 rstat=0
59 export dstat
60 export bstat
61 export rstat
62
63 end_test
64
65 exit $error