]> git.sur5r.net Git - bacula/bacula/commitdiff
Add install script
authorKern Sibbald <kern@sibbald.com>
Fri, 5 Jan 2007 11:46:34 +0000 (11:46 +0000)
committerKern Sibbald <kern@sibbald.com>
Fri, 5 Jan 2007 11:46:34 +0000 (11:46 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3927 91ce42f0-d328-0410-95d8-f526ca767f89

gui/bweb/install_bweb [new file with mode: 0755]

diff --git a/gui/bweb/install_bweb b/gui/bweb/install_bweb
new file mode 100755 (executable)
index 0000000..add8637
--- /dev/null
@@ -0,0 +1,46 @@
+#!/bin/sh
+#
+# Change the following four environment variables to suit your system
+#
+# Root directory of web files       
+#
+WEB_DIR=/var/www
+#
+# share directory for programs
+#
+SHARE_DIR=/usr/share
+#
+# cgi_bin location for web server
+#
+CGI_BIN=/usr/lib/cgi-bin
+#
+# Userid the web server is running under
+#
+HTTP_UID=www-data
+
+#
+# Normally you should not need to change the following
+#
+# first, copy the bweb perl library into your PERL5 INC path
+perl Makefile.PL
+make install
+
+# copy the bweb perl program to your cgi location
+mkdir -m 755 ${CGI_BIN}/bweb
+install -m 755 -o root -g root  cgi/*.pl ${CGI_BIN}/bweb
+
+# get a config file
+mkdir -m 755 /etc/bacula
+chown root:bacula /etc/bacula
+echo '$VAR1 = { template_dir => "${SHARE_DIR}/bweb/tpl" };' > /etc/bacula/bweb.conf
+chown ${HTTP_UID} /etc/bacula/bweb.conf
+
+# copy the bweb template file
+mkdir -p ${SHARE_DIR}/bweb/tpl
+install -m 644 -o root -g root  bweb/tpl/*.tpl ${SHARE_DIR}/bweb/tpl
+
+# copy the bweb graphics elements (bweb elements must reside in /bweb)
+mkdir ${WEB_DIR}/bweb
+install -m 644 -o root -g root  bweb/html/*.{js,png,css,gif,ico} ${WEB_DIR}/bweb
+
+# done !