[Pkg-nagios-changes] [SCM] debian packaging of icinga(-core) branch, master, updated. debian/1.9.3-1-2-g894a8ce

Alexander Wirt formorer at debian.org
Mon Jul 22 18:51:38 UTC 2013


The following commit has been merged in the master branch:
commit 894a8cedd5a4de1e76bbbae1909061b0a4655b47
Author: Alexander Wirt <formorer at debian.org>
Date:   Mon Jul 22 20:43:32 2013 +0200

    Fallback to commandline htpasswd if apache is < 2.4

diff --git a/debian/icinga-cgi.postinst b/debian/icinga-cgi.postinst
index 8948b93..999490b 100644
--- a/debian/icinga-cgi.postinst
+++ b/debian/icinga-cgi.postinst
@@ -71,7 +71,12 @@ case "$1" in
 	# XXX there's no way of setting the pw w/out giving it on the cmdline? wtf?
 	if [ -n "$admpass" ]; then
 		touch "$htpw"
-		echo "$admpass" | htpasswd -i "$htpw" icingaadmin
+        #unfortunatly that method only works with 2.4
+        if [ -e /usr/share/apache2/apache2-maintscript-helper ]; then
+    		echo "$admpass" | htpasswd -i "$htpw" icingaadmin
+        else
+            htpasswd -b "$htpw" icingaadmin "$admpass"
+        fi
 	fi
 
 	# everything went well, so now let's reset the password

-- 
debian packaging of icinga(-core)



More information about the Pkg-nagios-changes mailing list