debian/postinst
changeset 17 06bd98106980
parent 0 cc246ac74f0d
child 40 b13b69b2ce8d
--- a/debian/postinst	Fri Sep 12 11:30:07 2014 +0200
+++ b/debian/postinst	Fri Sep 12 12:56:06 2014 +0200
@@ -17,10 +17,22 @@
 # for details, see http://www.debian.org/doc/debian-policy/ or
 # the debian-policy package
 
+tmp=$(mktemp)
+trap "rm -f $tmp" EXIT
+
+update_log_level() {
+    test -f /etc/ssh/sshd_config || return
+    perl -pe 's/^LogLevel\s+\K.*/VERBOSE/' </etc/ssh/sshd_config >$tmp
+    test $(wc -l <$tmp) = $(wc -l </etc/ssh/sshd_config) || return 0
+    cat <$tmp >/etc/ssh/sshd_config
+    rm -f $tmp
+    invoke-rc.d ssh reload
+}
 
 case "$1" in
     configure)
 	update-schlittermann-ssh-keys
+	update_log_level
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)