- regex updates
authorDinko Korunic <kreator@carnet.hr>
Sun, 24 Apr 2011 15:22:46 +0000 (17:22 +0200)
committerDinko Korunic <kreator@carnet.hr>
Sun, 24 Apr 2011 15:22:46 +0000 (17:22 +0200)
debian/postinst

index ac48914..f34cc6a 100755 (executable)
@@ -34,7 +34,7 @@ CONF=/etc/fail2ban/jail.conf
 
 if [ -e "$CONF" ]; then
     # enable ssh, pam-generic, sasl, proftpd and vsftpd service
-    perl -ne 'if (/^\[(ssh|pam-generic|sasl|proftpd|vsftpd)\]/ .. /^enabled/) { $_ =~ s/^enabled\s=\sfalse/enabled    = true/gi }; print $_' "$CONF" > "$CONF.$$" && \
+    perl -ne 'if (/^\[(ssh|pam-generic|sasl|proftpd|vsftpd)\]/ .. /^enabled/) { $_ =~ s/^enabled\s+=\s+false/enabled   = true/gi }; print $_' "$CONF" > "$CONF.$$" && \
         cp_mv "$CONF.$$" "$CONF"
     rm -f "$CONF.$$"