Land #344, remove carriage returns from service config files

This commit is contained in:
Jeffrey Martin 2019-02-17 00:17:03 -06:00
commit 573494f73a
No known key found for this signature in database
GPG Key ID: 0CD9BBC2AF15F171
3 changed files with 13 additions and 4 deletions

View File

@ -18,6 +18,10 @@ cookbook_file '/etc/default/knockd' do
mode '0600'
end
execute 'remove_carriage_returns' do
command "sed -i -e 's/\r//g' /etc/default/knockd"
end
service 'knockd' do
action [:enable, :start]
end

View File

@ -40,6 +40,11 @@ cookbook_file '/etc/init.d/proftpd' do
mode '760'
end
execute 'remove_carriage_returns' do
command "sed -i -e 's/\r//g' /etc/init.d/proftpd"
end
# Setup the IP Renewer
cookbook_file '/opt/proftpd/proftpd_ip_renewer.rb' do
source 'proftpd/proftpd_ip_renewer.rb'
@ -48,6 +53,7 @@ cookbook_file '/opt/proftpd/proftpd_ip_renewer.rb' do
group 'root'
end
cookbook_file '/etc/init/proftpd_ip_renewer.conf' do
source 'proftpd/proftpd_ip_renewer.conf'
mode '0644'

View File

@ -67,11 +67,10 @@ cookbook_file '/etc/init.d/unrealircd' do
mode '760'
end
execute 'start unrealircd service' do
# This should ideally be a service resource but for some reason chef doesn't start the service properly when it is.
command '/etc/init.d/unrealircd start'
execute 'remove_carriage_returns' do
command "sed -i -e 's/\r//g' /etc/init.d/unrealircd"
end
service 'unrealircd' do
action :enable
action [:enable, :start]
end