3 # Change the following four environment variables to suit your system
5 # Root directory of web files
7 WEB_DIR=/srv/www/htdocs
9 # share directory for programs
13 # cgi_bin location for web server
15 CGI_BIN=/srv/www/cgi-bin
17 # Userid the web server is running under
22 if [ `whoami` != "root" ] ; then
23 echo "You must be root to run this script."
28 # Normally you should not need to change the following
30 # first, copy the bweb perl library into your PERL5 INC path
34 # copy the bweb perl program to your cgi location
35 if [ ! -d ${CGI_BIN}/bweb ] ; then
36 mkdir -m 755 ${CGI_BIN}/bweb
38 install -m 755 -o root -g root cgi/*.pl ${CGI_BIN}/bweb
41 if [ ! -d /etc/bacula ] ; then
42 mkdir -m 755 /etc/bacula
43 chown root:bacula /etc/bacula
46 # Setup a default /etc/bacula/bweb.conf
47 cat > /etc/bacula/bweb.conf <<END_OF_DATA
49 'graph_font' => '/usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf',
51 'config_file' => '/etc/bacula/bweb.conf',
52 'bconsole' => '/usr/sbin/bconsole -n -c /etc/bacula/bconsole.conf',
62 'device' => '/dev/changer',
68 'mtxcmd' => '/usr/sbin/mtx',
74 }, 'Bweb::Autochanger' )
77 'template_dir' => '${SHARE_DIR}/bweb/tpl',
78 'dbi' => 'DBI:mysql:database=bacula',
82 'email_media' => 'xxxx@localhost'
86 chown ${HTTP_USER} /etc/bacula/bweb.conf
88 # copy the bweb template file
89 if [ ! -d ${SHARE_DIR}/bweb/tpl ] ; then
90 mkdir -p ${SHARE_DIR}/bweb/tpl
92 install -m 644 -o root -g root tpl/*.tpl ${SHARE_DIR}/bweb/tpl
94 # copy the bweb graphics elements (bweb elements must reside in /bweb)
95 if [ ! -d ${WEB_DIR} ] ; then
98 install -m 644 -o root -g root html/*.{js,png,css,gif,ico,html} ${WEB_DIR}/bweb