[Pkg-nagios-changes] [icinga] 01/03: Fix htpasswd handling on apache < 2.4

Alexander Wirt formorer at debian.org
Thu Aug 8 12:11:01 UTC 2013


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

formorer pushed a commit to branch master
in repository icinga.

commit 35c5ef6ff294f7ec100be2553279febf3ce75075
Author: Alexander Wirt <formorer at debian.org>
Date:   Wed Jul 24 19:46:58 2013 +0200

    Fix htpasswd handling on apache < 2.4
---
 debian/icinga-cgi.postinst |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/debian/icinga-cgi.postinst b/debian/icinga-cgi.postinst
index 999490b..5ccdd70 100644
--- a/debian/icinga-cgi.postinst
+++ b/debian/icinga-cgi.postinst
@@ -72,10 +72,10 @@ case "$1" in
 	if [ -n "$admpass" ]; then
 		touch "$htpw"
         #unfortunatly that method only works with 2.4
-        if [ -e /usr/share/apache2/apache2-maintscript-helper ]; then
-    		echo "$admpass" | htpasswd -i "$htpw" icingaadmin
-        else
+        if htpasswd 2>&1 | grep -q ' -i'; then
             htpasswd -b "$htpw" icingaadmin "$admpass"
+        else
+    		echo "$admpass" | htpasswd -i "$htpw" icingaadmin
         fi
 	fi
 

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



More information about the Pkg-nagios-changes mailing list