Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add resource to manage version of freshclam package installed as well #35

Merged
merged 1 commit into from
Jul 3, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions recipes/install_deb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,19 @@
only_if { node['clamav']['dev_package'] }
end

package 'clamav-freshclam' do
action :install
version node['clamav']['version'] if node['clamav']['version']
if node['clamav']['clamd']['enabled']
notifies :restart,
"service[#{node['clamav']['clamd']['service']}]"
end
if node['clamav']['freshclam']['enabled']
notifies :restart,
"service[#{node['clamav']['freshclam']['service']}]"
end
end

files = %w(/etc/logrotate.d/clamav-daemon /etc/logrotate.d/clamav-freshclam)
files.each do |f|
file f do
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/recipes/install_deb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
require 'spec_helper'

describe 'clamav::install_deb' do
let(:packages) { %w(clamav clamav-daemon) }
let(:packages) { %w(clamav clamav-daemon clamav-freshclam) }
let(:clamd_service) { 'service[clamav-daemon]' }
let(:freshclam_service) { 'service[clamav-freshclam]' }
let(:attributes) { {} }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
let(:packages) do
case @node['platform_family']
when 'debian'
%w(clamav clamav-daemon)
%w(clamav clamav-daemon clamav-freshclam)
else
%w(clamav clamav-db clamd)
end
Expand Down