Use service command to restart docker, not upstart.

upstart ships by default on Ubuntu, but not on Debian, and service works
everywhere. Fixes #5245.
This commit is contained in:
Brandon Matthews 2015-04-10 10:06:21 -07:00
parent 1b99272b13
commit c0f43c362c
1 changed files with 1 additions and 2 deletions

View File

@ -7,8 +7,7 @@ module VagrantPlugins
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")
comm.sudo("service docker restart")
# Wait some amount time for the pid to become available
# so that we don't start executing Docker commands until