]> git.sur5r.net Git - bacula/bacula/blob - gui/debian/bweb.postinst
Renamed sqlitedatabase.class.php to sqlite.cdb.class.php
[bacula/bacula] / gui / debian / bweb.postinst
1 #!/bin/sh
2 set -e
3
4 . /usr/share/debconf/confmodule
5
6 db_version 2.0
7
8 if [ "$1" = "configure" ] ; then
9  if [ -f /etc/bweb/config ] ; then
10      echo "WARNING: /etc/bweb/config is no longer in use."
11      echo "Please, use /etc/bacula/bweb.conf instead."
12  fi
13
14  chmod 755 /etc/bacula
15
16  chown www-data:root /etc/bacula/bweb.conf
17  chgrp bacula /etc/bacula/bweb.conf || true
18  chmod 640 /etc/bacula/bweb.conf
19
20  chown www-data:root /var/spool/bweb
21  chmod 700 /var/spool/bweb
22  
23  echo
24  echo "If you are using postgresql, you have to load /usr/share/bweb/bweb-postgresql.sql in your database"
25  
26  echo "postgres@localhost:~$ createlang plpgsql -Upostgres -d bacula"
27  echo "postgres@localhost:~$ psql -U bacula bacula < /usr/share/bweb/bweb-postgresql.sql"
28  echo 
29  echo "If you are using mysql, you have to load /usr/share/bweb/bweb-mysql.sql in your database"
30  echo "root@localhost:~$ mysql bacula < /usr/share/bweb/bweb-mysql.sql"
31  echo
32  echo "You can use user/passwd (see /etc/apache2/sites-available/bweb.conf)"
33  echo "You have to enable bweb.conf (a2ensite) and reload your apache configuration"
34  echo 
35  echo "'/usr/bin/bconsole -n -c /etc/bacula/bconsole.conf' must be accessible"
36  echo "by your www-data. You meed to use :"
37  echo "chmod 644 /etc/bacula/bconsole.conf"
38  echo "chmod 755 /usr/bin/bconsole"
39  echo
40  echo "If you are upgrading from a previous version, read /usr/share/doc/bweb/UPGRADE notes"
41  echo
42  
43 fi
44
45 if [ "$1" = "upgrade" ] ; then
46  echo "If you are using postgresql, you have to load /usr/share/bweb/upgrade-2.0_2.2_postgresql.sql in your database"
47  echo "postgres@localhost:~$ psql -U bacula bacula < /usr/share/bweb/upgrade-2.0_2.2_postgresql.sql"
48  echo
49 fi