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
)
setenv.add-environment = (
- "PERLLIB" => basedir + "/lib/"
+ "PERLLIB" => basedir + "/lib/",
+ "BWEBCONF" => basedir + "/bweb.conf"
)
index-file.names = ( "index.html" )
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
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
+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.