]> git.sur5r.net Git - bacula/bacula/blob - gui/bweb/install_bweb
Add install script
[bacula/bacula] / gui / bweb / install_bweb
1 #!/bin/sh
2 #
3 # Change the following four environment variables to suit your system
4 #
5 # Root directory of web files       
6 #
7 WEB_DIR=/var/www
8 #
9 # share directory for programs
10 #
11 SHARE_DIR=/usr/share
12 #
13 # cgi_bin location for web server
14 #
15 CGI_BIN=/usr/lib/cgi-bin
16 #
17 # Userid the web server is running under
18 #
19 HTTP_UID=www-data
20
21 #
22 # Normally you should not need to change the following
23 #
24 # first, copy the bweb perl library into your PERL5 INC path
25 perl Makefile.PL
26 make install
27
28 # copy the bweb perl program to your cgi location
29 mkdir -m 755 ${CGI_BIN}/bweb
30 install -m 755 -o root -g root  cgi/*.pl ${CGI_BIN}/bweb
31
32 # get a config file
33 mkdir -m 755 /etc/bacula
34 chown root:bacula /etc/bacula
35 echo '$VAR1 = { template_dir => "${SHARE_DIR}/bweb/tpl" };' > /etc/bacula/bweb.conf
36 chown ${HTTP_UID} /etc/bacula/bweb.conf
37
38 # copy the bweb template file
39 mkdir -p ${SHARE_DIR}/bweb/tpl
40 install -m 644 -o root -g root  bweb/tpl/*.tpl ${SHARE_DIR}/bweb/tpl
41
42 # copy the bweb graphics elements (bweb elements must reside in /bweb)
43 mkdir ${WEB_DIR}/bweb
44 install -m 644 -o root -g root  bweb/html/*.{js,png,css,gif,ico} ${WEB_DIR}/bweb
45
46 # done !