From 91a454640e942916aee66571300a63dd466ddec9 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Tue, 2 Jan 2007 21:49:41 +0000 Subject: [PATCH] ebl use conffiles instead of post install script git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3903 91ce42f0-d328-0410-95d8-f526ca767f89 --- gui/debian/bweb.conffiles | 1 + gui/debian/bweb.dirs | 2 +- gui/debian/bweb.postinst | 33 +++++++++++++-------------------- gui/debian/changelog | 1 + gui/debian/rules | 2 ++ 5 files changed, 18 insertions(+), 21 deletions(-) create mode 100644 gui/debian/bweb.conffiles diff --git a/gui/debian/bweb.conffiles b/gui/debian/bweb.conffiles new file mode 100644 index 0000000000..fda2762735 --- /dev/null +++ b/gui/debian/bweb.conffiles @@ -0,0 +1 @@ +/etc/bacula/bweb.conf diff --git a/gui/debian/bweb.dirs b/gui/debian/bweb.dirs index 13a85e606b..720d96f0f4 100644 --- a/gui/debian/bweb.dirs +++ b/gui/debian/bweb.dirs @@ -1,4 +1,4 @@ -etc/bweb +etc/bacula etc/apache/conf.d usr/lib/cgi-bin/bweb usr/share/doc/bweb diff --git a/gui/debian/bweb.postinst b/gui/debian/bweb.postinst index 8437eba472..6b274a2739 100644 --- a/gui/debian/bweb.postinst +++ b/gui/debian/bweb.postinst @@ -7,28 +7,21 @@ 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", fv_write_path => "/var/spool/bweb" };' > /etc/bacula/bweb.conf + chown www-data:root /etc/bacula/bweb.conf + chmod 600 /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 + 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" - echo - echo "You can use user/passwd (see /etc/apache/conf.d/bweb.conf)" - echo "You have to reload your apache configuration" - fi + 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" + echo + echo "You can use user/passwd (see /etc/apache/conf.d/bweb.conf)" + echo "You have to reload your apache configuration" fi diff --git a/gui/debian/changelog b/gui/debian/changelog index d23e620818..df0c5c71ef 100644 --- a/gui/debian/changelog +++ b/gui/debian/changelog @@ -2,6 +2,7 @@ bweb (2.0.0-2) stable; urgency=low * Add french tpl in /usr/share/bweb/fr/tpl * Add favicon.ico + * Change /etc/bacula/bweb.conf initialisation -- Eric Bollengier Mon, 01 Jan 2007 09:22:47 +0000 diff --git a/gui/debian/rules b/gui/debian/rules index 3a554fc0d0..7610594ba0 100755 --- a/gui/debian/rules +++ b/gui/debian/rules @@ -65,6 +65,8 @@ install-indep: install -m 644 bweb/html/*.html debian/bweb/usr/share/bweb/html install -m 644 bweb/html/*.ico debian/bweb/usr/share/bweb/html install -m 644 bweb/script/bweb-postgresql.sql debian/bweb/usr/share/bweb + echo '$$VAR1 = { template_dir => "/usr/share/bweb/tpl", fv_write_path => "/var/spool/bweb" };' > debian/bweb/etc/bacula/bweb.conf + chmod 600 debian/bweb/etc/bacula/bweb.conf dh_install -i touch install-indep-stamp -- 2.39.5