This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

use newer syntax for notification, move service up

  • Loading branch information...
jtimberman committed Apr 11, 2011
1 parent ef6df66 commit aefe06939743a4e10681a015911c36dfc373109b
Showing with 10 additions and 9 deletions.
  1. +2 −2 fail2ban/metadata.json
  2. +1 −1 fail2ban/metadata.rb
  3. +7 −6 fail2ban/recipes/default.rb
View
@@ -20,7 +20,7 @@
]
},
"license": "Apache 2.0",
- "version": "0.7.1",
+ "version": "1.0.0",
"providing": {
},
"recipes": {
@@ -33,4 +33,4 @@
"groupings": {
},
"long_description": ""
- }
+ }
View
@@ -2,7 +2,7 @@
maintainer_email "cookbooks@opscode.com"
license "Apache 2.0"
description "Installs and configures fail2ban"
-version "0.7.1"
+version "1.0.0"
recipe "fail2ban", "Installs and configures fail2ban"
@@ -2,7 +2,7 @@
# Cookbook Name:: fail2ban
# Recipe:: default
#
-# Copyright 2009, Opscode, Inc.
+# Copyright 2009-2011, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -20,16 +20,17 @@
action :upgrade
end
-service "fail2ban" do
- action :enable
-end
-
%w{ fail2ban jail }.each do |cfg|
template "/etc/fail2ban/#{cfg}.conf" do
source "#{cfg}.conf.erb"
owner "root"
group "root"
mode 0644
- notifies :restart, resources(:service => "fail2ban")
+ notifies :restart, "service[fail2ban]"
end
end
+
+service "fail2ban" do
+ supports [ :status => true, :restart => true ]
+ action [ :enable, :start ]
+end

0 comments on commit aefe069

Please sign in to comment.