From 0f58b89e3bd601dbe6a9aa0c4173b069f2b6ba58 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Tue, 4 Aug 2009 16:00:19 +0200 Subject: [PATCH] document bweb+lighttpd --- gui/bweb/INSTALL | 13 ++++++------- gui/bweb/script/starthttp | 25 +++++++++++++++++++++++-- gui/bweb/technotes-3.0 | 3 +++ 3 files changed, 32 insertions(+), 9 deletions(-) diff --git a/gui/bweb/INSTALL b/gui/bweb/INSTALL index 7e65172196..619ebf6a80 100644 --- a/gui/bweb/INSTALL +++ b/gui/bweb/INSTALL @@ -71,12 +71,6 @@ Bweb works well with 2.0 release or later. In this example, bweb files are in /home/bacula/bweb bacula:~$ cd bweb -bacula:~/bweb$ sed -i "s:/etc/bacula/bweb.conf:$PWD/bweb.conf:" lib/Bweb.pm -bacula:~/bweb$ cat > bweb.conf < '$PWD/lang', - fv_write_path => '/tmp/', - }; -EOF # configure the database bacula:~/bweb$ mysql bacula < script/bweb-mysql.sql @@ -85,13 +79,18 @@ bacula:~/bweb$ psql bacula < script/bweb-postgresql.sql # You can start the web server from the bweb directory bacula@localhost:~/bweb$ ./script/starthttp - Using bweb on /home/eric/dev/git/gui/bweb, use firefox http://localhost:9180 + Making configuration template in /home/bacula/bweb/bweb.conf + Adjusting bweb.conf path + Using bweb on /home/bacula/bweb, use firefox http://localhost:9180 2009-07-18 22:23:12: (log.c.75) server started By default, only the loopback interface is binded, you can change that in the bweb/script/httpd.conf file. +You will have to configure bweb with your database and bconsole info, it +can be done in the web interface. + ################ FILE COPY (Full Apache methode) ############### # you must get bweb svn files diff --git a/gui/bweb/script/starthttp b/gui/bweb/script/starthttp index 06e4b42429..e2e4e2aa7c 100755 --- a/gui/bweb/script/starthttp +++ b/gui/bweb/script/starthttp @@ -18,11 +18,32 @@ else exit 1 fi +grep /etc/bacula/bweb.conf $BASE/lib/Bweb.pm > /dev/null +if [ $? -eq 0 ]; then + echo "Adjusting bweb.conf path" + sed -i~ "s:/etc/bacula/bweb.conf:$BASE/bweb.conf:" $BASE/lib/Bweb.pm +fi + +if [ ! -f $BASE/bweb.conf ]; then + echo "Making configuration template in $BASE/bweb.conf" + cat > $BASE/bweb.conf < '$PWD/lang', + fv_write_path => '/tmp/', + }; +EOF +fi + host=$(awk -F'"' '/bind/ { print $2 }' $BWEBBASE/script/httpd.conf) port=$(awk '/port/ { print $3 }' $BWEBBASE/script/httpd.conf) echo "Using bweb on $BWEBBASE, use firefox http://$host:$port" export BWEBBASE -export PERL5LIB=$BWEBBASE/lib -lighttpd -f $BWEBBASE/script/httpd.conf +if [ x$1 = x -o x$1 = xstart ]; then + lighttpd -f $BWEBBASE/script/httpd.conf + + if [ $? -ne 0 ]; then + echo "Something is wrong with lighttpd, be sure that it is installed" + exit $? + fi +fi diff --git a/gui/bweb/technotes-3.0 b/gui/bweb/technotes-3.0 index 2db98e0549..5043e19adf 100644 --- a/gui/bweb/technotes-3.0 +++ b/gui/bweb/technotes-3.0 @@ -1,3 +1,6 @@ +04Aug09 +ebl Document bweb+lighttpd that should permit to use bweb + in 2 lines of shell. 31Jul09 ebl Apply quick fix from Ulrich about the last feature. 28Jul09 -- 2.39.5