]> git.sur5r.net Git - bacula/bacula/blob - gui/debian/bweb.postinst
ebl fix /etc/bacula permissions
[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  chmod 600 /etc/bacula/bweb.conf
18
19  chown www-data:root /var/spool/bweb
20  chmod 700 /var/spool/bweb
21  
22  echo
23  echo "If you are using postgresql, you have to load /usr/share/bweb/bweb-postgresql.sql in your database"
24  
25  echo "postgres@localhost:~$ psql bacula < /usr/share/bweb/bweb-postgresql.sql"
26  echo 
27  echo "You can use user/passwd (see /etc/apache/conf.d/bweb.conf)"
28  echo "You have to reload your apache configuration"
29  echo 
30  echo "'/usr/bin/bconsole -n -c /etc/bacula/bconsole.conf' must be accessible"
31  echo "by your www-data. You meed to use :"
32  echo "chmod 644 /etc/bacula/bconsole.conf"
33  echo "chmod 755 /usr/bin/bconsole"
34  
35 fi