This file contains 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
# as root or via sudo | |
cryptsetup luksOpen /dev/dradispro/data data-open | |
mount /dev/mapper/data-open /mnt/data |
This file contains 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
require 'csv' | |
if ARGV.count != 1 | |
puts "Usage:\n\t#{$0} <file.csv>" | |
exit 1 | |
end | |
file = ARGV.first | |
if !File.exist?(file) |
This file contains 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
class Fail2banNotifier | |
def initialize(options) | |
@default_options = options | |
@default_options[:logfile] ||= Rails.root.join('log', 'fail2ban.log') | |
# Roll over every 30M, keep 10 files | |
@logger ||= Logger.new(@default_options[:logfile], 10, 30*1024*1024) | |
end | |
def call(exception, options={}) |
OlderNewer