vagrant/plugins/provisioners/docker/cap/redhat/docker_configure_auto_start.rb

16 lines
447 B
Ruby
Raw Normal View History

2013-12-12 17:16:59 +00:00
module VagrantPlugins
module DockerProvisioner
2013-12-12 17:16:59 +00:00
module Cap
module Redhat
module DockerConfigureAutoStart
def self.docker_configure_auto_start(machine)
if ! machine.communicate.test('grep -q \'\-r=true\' /etc/sysconfig/docker')
machine.communicate.sudo("sed -i.bak 's/docker -d/docker -d -r=true/' /etc/sysconfig/docker ")
end
end
end
end
end
end
end