]> git.sur5r.net Git - bacula/bacula/commitdiff
document bweb+lighttpd
authorEric Bollengier <eric@eb.homelinux.org>
Tue, 4 Aug 2009 14:00:19 +0000 (16:00 +0200)
committerEric Bollengier <eric@eb.homelinux.org>
Tue, 22 Sep 2009 09:01:31 +0000 (11:01 +0200)
gui/bweb/INSTALL
gui/bweb/script/starthttp
gui/bweb/technotes-3.0

index 7e65172196c52437981770f772ac88deadc0aa14..619ebf6a800fc4f0d81e430dd30442a9b9e68416 100644 (file)
@@ -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 <<EOF
-\$VAR1 = { template_dir => '$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
index 06e4b42429b4dd1afa69c2d206a2fcf53de3f15a..e2e4e2aa7c8d4b32e2034cc070a7397b10f6dbf3 100755 (executable)
@@ -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 <<EOF
+\$VAR1 = { template_dir => '$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
index 2db98e0549bef29c4424590a91e91525d13531a0..5043e19adfaf9526231a9ca9c1c32e9adc5baac4 100644 (file)
@@ -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