]> git.sur5r.net Git - bacula/bacula/blob - regress/scripts/setup_win32
regress: fix add_attribute() function in perl lib
[bacula/bacula] / regress / scripts / setup_win32
1 #!/bin/bash
2 #
3 # Setup windows box
4 #
5 . scripts/functions
6
7 echo "Trying to setup $WIN32_ADDR"
8 URL=http://$WIN32_ADDR:8091
9
10 echo "Stopping bacula-fd service"
11 wget -qO /dev/null "$URL/stop"
12
13 echo -en "Set director name:\t\t"
14 wget -qO - "$URL/set_director_name?name=$HOST-dir;pass=$WIN32_PASSWORD"
15
16 if [ x$WIN32_USER != x ]; then
17     echo -en "Setting auto_logon:\t\t"
18     wget -qO - "$URL/set_auto_logon?user=$WIN32_USER;pass=$WIN32_PASS"
19 fi
20
21 update_win32
22
23 echo "Starting bacula-fd service"
24 wget -qO /dev/null "$URL/start"
25
26 echo -ne "Reloading regress-win32.pl:\t"
27 wget -qO - "$URL/reload"
28
29 i=0
30 while ! wget -qO /dev/null $URL/nop; do
31     sleep 5
32     i=`expr $i + 1`
33     if [ $i -ge 12 ]; then  # print message every minute
34        i=0
35        echo "== `date +%T` Waiting for script to reload"
36     fi
37 done