2013-11-26 21:48:51 +00:00
|
|
|
module VagrantPlugins
|
|
|
|
module Docker
|
|
|
|
module Cap
|
|
|
|
module Debian
|
|
|
|
module DockerConfigureAutoStart
|
|
|
|
def self.docker_configure_auto_start(machine)
|
2014-01-22 04:52:27 +00:00
|
|
|
machine.communicate.tap do |comm|
|
|
|
|
if !comm.test('grep -q \'\-r=true\' /etc/default/docker')
|
|
|
|
comm.sudo("echo 'DOCKER_OPTS=\"-r=true ${DOCKER_OPTS}\"' >> /etc/default/docker")
|
|
|
|
comm.sudo("stop docker")
|
|
|
|
comm.sudo("start docker")
|
|
|
|
end
|
2013-11-26 21:48:51 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|