This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# init script for Cassandra. | |
# chkconfig: 2345 90 10 | |
# description: Cassandra | |
# script slightly modified from | |
# http://blog.milford.io/2010/06/installing-apache-cassandra-on-centos/ | |
# | |
# And further tweaked for Apereo OAE | |
# | |
. /etc/rc.d/init.d/functions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn count-ips [logfile] | |
(remove empty? | |
(persistent! (reduce | |
#(assoc! %1 %2 (inc (get %1 %2 0))) | |
(transient {}) | |
(of-IPs | |
(find-lines "Deny tcp src outside" logfile)))))) |