summaryrefslogtreecommitdiff
path: root/db/migrate/20130203164500_remove_perimeter_parameters.rb
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-02-12 13:53:28 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-02-12 13:53:28 +0100
commitc9066760fd1f5f2f892ce2be5cf2a83bb5210246 (patch)
tree82ecdd528e803ccd1b469dc13482e06cf8ea0b8e /db/migrate/20130203164500_remove_perimeter_parameters.rb
parent0b97717b2171820dea41de8df705f8f0e4b71464 (diff)
parentfb66a5e5a4c5d5f9eac4a5e8de6a286482cb55d5 (diff)
Release a new beta.5.1-beta4
Diffstat (limited to 'db/migrate/20130203164500_remove_perimeter_parameters.rb')
-rw-r--r--db/migrate/20130203164500_remove_perimeter_parameters.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/db/migrate/20130203164500_remove_perimeter_parameters.rb b/db/migrate/20130203164500_remove_perimeter_parameters.rb
new file mode 100644
index 0000000..8c37174
--- /dev/null
+++ b/db/migrate/20130203164500_remove_perimeter_parameters.rb
@@ -0,0 +1,16 @@
+class RemovePerimeterParameters < ActiveRecord::Migration
+ def up
+ GsParameter.where(:entity => 'perimeter', :section => 'general', :name => 'malicious_contact_count').destroy_all
+ GsParameter.where(:entity => 'perimeter', :section => 'general', :name => 'malicious_contact_time_span').destroy_all
+ GsParameter.where(:entity => 'perimeter', :section => 'general', :name => 'ban_futile').destroy_all
+ GsParameter.where(:entity => 'perimeter', :section => 'general', :name => 'execute').destroy_all
+
+ end
+
+ def down
+ GsParameter.create(:entity => 'perimeter', :section => 'general', :name => 'malicious_contact_count', :value => 20, :class_type => 'Integer')
+ GsParameter.create(:entity => 'perimeter', :section => 'general', :name => 'malicious_contact_time_span', :value => 2, :class_type => 'Integer')
+ GsParameter.create(:entity => 'perimeter', :section => 'general', :name => 'ban_futile', :value => 5, :class_type => 'Integer')
+ GsParameter.create(:entity => 'perimeter', :section => 'general', :name => 'execute', :value => 'sudo /usr/local/bin/ban_ip.sh {ip_address}', :class_type => 'String')
+ end
+end