X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=gui%2Fbweb%2Finstall_bweb;h=05c6e322cbe9f4a74b3ed750df01c2a7a2046e68;hb=d0f07fac9cba319161ef3c52ddba91d085ea498a;hp=5e0d2484c89c20ea29ff28a7d67f6645b2aa94aa;hpb=1c418f4f442aebbee6a66b03b7033259636db583;p=bacula%2Fbacula diff --git a/gui/bweb/install_bweb b/gui/bweb/install_bweb index 5e0d2484c8..05c6e322cb 100755 --- a/gui/bweb/install_bweb +++ b/gui/bweb/install_bweb @@ -1,6 +1,14 @@ #!/bin/sh # # Change the following four environment variables to suit your system +# Note, the configuration below works on a stock SuSE 10.2 system +# +# You can, in general, execute this file multiple times. However, if +# you edit certain of the installed files, your changes might be lost. +# This script will not overwrite any installed /etc/bacula/bweb.conf +# +# Configuration directory for bweb +CONF_DIR=/etc/bacula # # Root directory of web files # @@ -34,6 +42,7 @@ fi # Normally you should not need to change the following # # first, copy the bweb perl library into your PERL5 INC path +sed -i "s!/etc/bacula!${CONF_DIR}!" lib/Bweb.pm perl Makefile.PL make install @@ -44,17 +53,18 @@ fi install -m 755 -o root -g root cgi/*.pl ${CGI_BIN}/bweb # get a config file -if [ ! -d /etc/bacula ] ; then - mkdir -m 755 /etc/bacula - chown root:bacula /etc/bacula +if [ ! -d ${CONF_DIR} ] ; then + mkdir -m 755 ${CONF_DIR} + chown root:bacula ${CONF_DIR} fi -# Setup a default /etc/bacula/bweb.conf -cat > /etc/bacula/bweb.conf < ${CONF_DIR}/bweb.conf < '/usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf', 'name' => undef, - 'config_file' => '/etc/bacula/bweb.conf', + 'config_file' => '${CONF_DIR}/bweb.conf', 'bconsole' => '/usr/sbin/bconsole -n -c /etc/bacula/bconsole.conf', 'ach_list' => { 'S1_L80' => bless( { @@ -88,8 +98,9 @@ cat > /etc/bacula/bweb.conf < '${EMAIL_ADDR}' }, 'Bweb::Config' ); END_OF_DATA +fi -chown ${HTTP_USER} /etc/bacula/bweb.conf +chown ${HTTP_USER} ${CONF_DIR}/bweb.conf # copy the bweb template file if [ ! -d ${SHARE_DIR}/bweb/tpl ] ; then @@ -103,4 +114,13 @@ if [ ! -d ${WEB_DIR} ] ; then fi install -m 644 -o root -g root html/*.{js,png,css,gif,ico,html} ${WEB_DIR}/bweb +echo " " +echo "Please edit /etc/bweb.conf and ensure that all the paths to" +echo " the various programs and files such as bconsole, bconsole.conf" +echo " are correct, and that the DBI driver is correct (default mysql)" +echo " and has the right password for your DB" +echo " " + + + # done !