Skip to content

Instantly share code, notes, and snippets.

View marktriggs's full-sized avatar
💭
PROGRAMMING

Mark Triggs marktriggs

💭
PROGRAMMING
View GitHub Profile
#!/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
(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))))))