3 # start bweb with lighttpd
7 if [ -f $PWD/html/bweb.js ]; then
10 elif [ -f $PWD/../html/bweb.js ]; then
11 BWEBBASE=$(dirname $PWD)
13 elif [ -f $BASE/html/bweb.js ]; then
17 echo "Can't determine bweb installation directory"
21 grep /etc/bacula/bweb.conf $BWEBBASE/lib/Bweb.pm > /dev/null
23 echo "Adjusting bweb.conf path"
24 sed -i~ "s:/etc/bacula/bweb.conf:$BWEBBASE/bweb.conf:" $BWEBBASE/lib/Bweb.pm
27 if [ ! -f $BWEBBASE/bweb.conf ]; then
28 echo "Making configuration template in $BWEBBASE/bweb.conf"
29 cat > $BWEBBASE/bweb.conf <<EOF
30 \$VAR1 = { template_dir => '$PWD/lang',
31 fv_write_path => '/tmp/',
36 host=$(awk -F'"' '/bind/ { print $2 }' $BWEBBASE/script/httpd.conf)
37 port=$(awk '/port/ { print $3 }' $BWEBBASE/script/httpd.conf)
39 echo "Using bweb on $BWEBBASE, use firefox http://$host:$port"
42 if [ x$1 = x -o x$1 = xstart ]; then
43 lighttpd -f $BWEBBASE/script/httpd.conf
46 echo "Something is wrong with lighttpd, be sure that it is installed"
51 if [ x$1 = xstop ]; then