Commit Diff


commit - 2d9a3ec484a5b4ad46cf1f12473505532f56bba3
commit + ee568cc4440015b45d7fd12b00974c4d1fba658c
blob - b2ae4053583aa323617c3bf70c045a3861c466e7
blob + 556793422965de19db04747dafb3217172c22c8a
--- contrib/Debian/ngircd.postinst
+++ contrib/Debian/ngircd.postinst
@@ -1,14 +1,21 @@
 #!/bin/sh
 #
 # Debian post-installation script
-# $Id: ngircd.postinst,v 1.1 2003/12/31 17:20:11 alex Exp $
+# $Id: ngircd.postinst,v 1.2 2006/12/26 14:44:40 alex Exp $
 #
 
-if [ -f /etc/ngircd/ngircd.conf ]; then
-	# make sure that configuration file is not world readable
-	chmod o= /etc/ngircd/ngircd.conf
-fi
+set -e
 
+case "$1" in
+	configure)
+		if [ -f /etc/ngircd/ngircd.conf ]; then
+			# make sure that the configuration file is not
+			# world-readable, it contains passwords!
+			chmod o= /etc/ngircd/ngircd.conf
+		fi
+		;;
+esac
+
 #DEBHELPER#
 
 # -eof-