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
45 echo '$VAR1 = { template_dir => "${SHARE_DIR}/bweb/tpl" };' > /etc/bacula/bweb.conf
46 chown ${HTTP_USER} /etc/bacula/bweb.conf
48 # copy the bweb template file
49 if [ ! -d ${SHARE_DIR}/bweb/tpl ] ; then
50 mkdir -p ${SHARE_DIR}/bweb/tpl
52 install -m 644 -o root -g root tpl/*.tpl ${SHARE_DIR}/bweb/tpl
54 # copy the bweb graphics elements (bweb elements must reside in /bweb)
55 if [ ! -d ${WEB_DIR} ] ; then
58 install -m 644 -o root -g root html/*.{js,png,css,gif,ico} ${WEB_DIR}/bweb