[Pkg-nagios-changes] [pkg-icinga-web] 10/11: Fix setperm in postinst

Markus Frosch (old DM Account) lazyfrosch-guest at moszumanska.debian.org
Tue Sep 9 13:02:08 UTC 2014


This is an automated email from the git hooks/post-receive script.

lazyfrosch-guest pushed a commit to branch master
in repository pkg-icinga-web.

commit dc82307079d58ba114b3642eb6b4b114551a7cba
Author: Markus Frosch <markus at lazyfrosch.de>
Date:   Tue Sep 9 14:57:44 2014 +0200

    Fix setperm in postinst
---
 debian/icinga-web-config-icinga2-ido-mysql.postinst | 5 ++++-
 debian/icinga-web-config-icinga2-ido-pgsql.postinst | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/debian/icinga-web-config-icinga2-ido-mysql.postinst b/debian/icinga-web-config-icinga2-ido-mysql.postinst
index ef3b9fc..3a103b0 100644
--- a/debian/icinga-web-config-icinga2-ido-mysql.postinst
+++ b/debian/icinga-web-config-icinga2-ido-mysql.postinst
@@ -52,6 +52,10 @@ write_access_local() {
 
     echo "database config successful: $file"
     rm -f $tempfile
+
+    if [ -f $file ]; then
+        setperm root www-data 0640 /etc/icinga-web/conf.d/access.local.xml
+    fi
 }
 
 generate_dbxml() {
@@ -102,7 +106,6 @@ case "$1" in
                            /etc/dbconfig-common/icinga2-ido-mysql.conf
 
             setperm root www-data 0640 /etc/icinga-web/conf.d/database-ido.xml
-            setperm root www-data 0640 /etc/icinga-web/conf.d/access.local.xml
         else
             (
             echo
diff --git a/debian/icinga-web-config-icinga2-ido-pgsql.postinst b/debian/icinga-web-config-icinga2-ido-pgsql.postinst
index a30d73f..7b65e39 100644
--- a/debian/icinga-web-config-icinga2-ido-pgsql.postinst
+++ b/debian/icinga-web-config-icinga2-ido-pgsql.postinst
@@ -52,6 +52,10 @@ write_access_local() {
 
     echo "database config successful: $file"
     rm -f $tempfile
+
+    if [ -f $file ]; then
+        setperm root www-data 0640 /etc/icinga-web/conf.d/access.local.xml
+    fi
 }
 
 generate_dbxml() {
@@ -102,7 +106,6 @@ case "$1" in
                            /etc/dbconfig-common/icinga2-ido-pgsql.conf
 
             setperm root www-data 0640 /etc/icinga-web/conf.d/database-ido.xml
-            setperm root www-data 0640 /etc/icinga-web/conf.d/access.local.xml
         else
             (
             echo

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-nagios/pkg-icinga-web.git



More information about the Pkg-nagios-changes mailing list