]> git.sur5r.net Git - bacula/bacula/commitdiff
Add BWEBCONF env variable to specify the bweb.conf path without
authorEric Bollengier <eric@eb.homelinux.org>
Wed, 19 Aug 2009 10:57:35 +0000 (12:57 +0200)
committerEric Bollengier <eric@eb.homelinux.org>
Wed, 19 Aug 2009 20:44:41 +0000 (22:44 +0200)
touching the Bweb.pm file with lighttpd

gui/bweb/lib/Bweb.pm
gui/bweb/script/httpd.conf
gui/bweb/script/starthttp
gui/bweb/technotes-3.0

index d0be07ebc91bfae0761f0a364d5cfa2a08036f34..31db71bdfcda83ff6c6aa9c51147ec47717232b6 100644 (file)
@@ -1279,7 +1279,12 @@ use base q/Bweb::Gui/;
 use DBI;
 use POSIX qw/strftime/;
 
-our $config_file='/etc/bacula/bweb.conf';
+our $config_file= '/etc/bacula/bweb.conf';
+
+if ($ENV{BWEBCONF} && -f $ENV{BWEBCONF}) {
+    $config_file = $ENV{BWEBCONF};
+}
+
 our $cur_id=0;
 
 =head1 VARIABLE
index d67026a5c9fcc65cefae898690a441940614ac03..81793bc1269edb857c94dae90072deadc8f78977 100644 (file)
@@ -21,7 +21,8 @@ alias.url = ( "/cgi-bin/bweb/" => basedir + "/cgi/",
                )
 
 setenv.add-environment = ( 
-  "PERLLIB" => basedir + "/lib/"
+  "PERLLIB" => basedir + "/lib/",
+  "BWEBCONF" => basedir + "/bweb.conf"
 )
 
 index-file.names = ( "index.html" )
index 5fab8bc94247afa93400d384ea968acd4aa02682..dd5b08896797ffaa2f56238ab08280eccf865cab 100755 (executable)
@@ -21,12 +21,6 @@ else
     exit 1
 fi
 
-grep /etc/bacula/bweb.conf $BWEBBASE/lib/Bweb.pm > /dev/null
-if [ $? -eq 0 ]; then
-    echo "Adjusting bweb.conf path"
-    sed -i~ "s:/etc/bacula/bweb.conf:$BWEBBASE/bweb.conf:" $BWEBBASE/lib/Bweb.pm
-fi
-
 if [ ! -f $BWEBBASE/bweb.conf ]; then
     echo "Making configuration template in $BWEBBASE/bweb.conf"
     cat > $BWEBBASE/bweb.conf <<EOF
@@ -42,6 +36,7 @@ port=$(awk '/port/ { print $3 }' $BWEBBASE/script/httpd.conf)
 
 echo "Using bweb on $BWEBBASE,  use firefox http://$host:$port"
 export BWEBBASE
+export BWEBCONF=$BWEBBASE/bweb.conf
 
 if [ x$1 = x -o x$1 = xstart ]; then
     lighttpd -f $BWEBBASE/script/httpd.conf
index c0903fb44b09026ea66b150bbebf7b995c94254f..4db431708720e26ceb7944db86021bc3f445f224 100644 (file)
@@ -1,3 +1,8 @@
+19Aug09
+ebl  Add BWEBCONF env variable to specify the bweb.conf path without
+     touching the Bweb.pm file with lighttpd
+ebl  Tweak the btime.pl module to disable caching
+ebl  Add a "Full name" option to btime for easy debugging
 15Aug09
 ebl  Add fullname parameter to btime in order to debug
      regress script.