X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=gui%2Fdebian%2Fbweb.postinst;h=7f75d9a39544da9c55023461b6c08055a98d3eb0;hb=18d2e6efcdabe2e9cf09874644fd20d80e2edb68;hp=5273dcf66984ffd2a88028ce12ac9fb46582e647;hpb=8c8ce4611283feae91873f0397da5109d6f56327;p=bacula%2Fbacula diff --git a/gui/debian/bweb.postinst b/gui/debian/bweb.postinst index 5273dcf669..7f75d9a395 100644 --- a/gui/debian/bweb.postinst +++ b/gui/debian/bweb.postinst @@ -7,26 +7,43 @@ db_version 2.0 if [ "$1" = "configure" ] ; then if [ -f /etc/bweb/config ] ; then - echo "/etc/bweb/config have moved to /etc/bacula/bweb.conf" - echo "you can remove /etc/bweb" - [ ! -d /etc/bacula ] && mkdir /etc/bacula - cp -p /etc/bweb/config /etc/bacula/bweb.conf - sed -i 's!/etc/bweb/config!/etc/bacula/bweb.conf!' /etc/bacula/bweb.conf + echo "WARNING: /etc/bweb/config is no longer in use." + echo "Please, use /etc/bacula/bweb.conf instead." fi - if [ ! -f /etc/bacula/bweb.conf ] ; then - echo '$VAR1 = { template_dir => "/usr/share/bweb/tpl" };' > /etc/bacula/bweb.conf - - chown www-data:root /etc/bacula/bweb.conf - chmod 640 /etc/bacula/bweb.conf - - chown www-data:root /var/spool/bweb - chmod 700 /var/spool/bweb - - echo - echo "If you are using postgresql, you have to load /usr/share/bweb/bweb-postgresql.sql in your database" - - echo "postgres@localhost:~$ psql bacula < /usr/share/bweb/bweb-postgresql.sql" + chmod 755 /etc/bacula + + chown www-data:root /etc/bacula/bweb.conf + chgrp bacula /etc/bacula/bweb.conf || true + chmod 640 /etc/bacula/bweb.conf + + chown www-data:root /var/spool/bweb + chmod 700 /var/spool/bweb + + echo + echo "If you are using postgresql, you have to load /usr/share/bweb/bweb-postgresql.sql in your database" + + echo "postgres@localhost:~$ createlang plpgsql -Upostgres -d bacula" + echo "postgres@localhost:~$ psql -U bacula bacula < /usr/share/bweb/bweb-postgresql.sql" + echo + echo "If you are using mysql, you have to load /usr/share/bweb/bweb-mysql.sql in your database" + echo "root@localhost:~$ mysql bacula < /usr/share/bweb/bweb-mysql.sql" + echo + echo "You can use user/passwd (see /etc/apache2/sites-available/bweb.conf)" + echo "You have to enable bweb.conf (a2ensite) and reload your apache configuration" + echo + echo "'/usr/bin/bconsole -n -c /etc/bacula/bconsole.conf' must be accessible" + echo "by your www-data. You meed to use :" + echo "chmod 644 /etc/bacula/bconsole.conf" + echo "chmod 755 /usr/bin/bconsole" + echo + echo "If you are upgrading from a previous version, read /usr/share/doc/bweb/UPGRADE notes" + echo + +fi - fi +if [ "$1" = "upgrade" ] ; then + echo "If you are using postgresql, you have to load /usr/share/bweb/upgrade-2.0_2.2_postgresql.sql in your database" + echo "postgres@localhost:~$ psql -U bacula bacula < /usr/share/bweb/upgrade-2.0_2.2_postgresql.sql" + echo fi