mirror of
https://github.com/rapid7/metasploitable3.git
synced 2024-09-21 00:01:14 +02:00
remove carriage returns from service config files
This commit is contained in:
parent
f9ce0e42dc
commit
adacceed5a
|
@ -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
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user