Sha256: d121bc54e1b35efdca3aab4ea8aadf76636ac24c7ca3bcb02559068bdeecd673

Contents?: true

Size: 876 Bytes

Versions: 4

Compression:

Stored size: 876 Bytes

Contents

module VagrantPlugins
  module Ventriloquist
    module Cap
      module Debian
        module VentriloquistContainersUpstart
          def self.ventriloquist_containers_upstart(machine)
            machine.communicate.tap do |comm|
              if ! comm.test('test -f /etc/init/ventriloquist.conf')
                machine.env.ui.info('Configuring Ventriloquist services upstart')
                machine.communicate.sudo '
cat<<EOF > /etc/init/ventriloquist.conf
description "Restart configured Ventriloquist services after reboot"

start on (started docker)

script
  if [ -d /var/lib/ventriloquist/cids ]; then
    sleep 1 # Give Docker some time
    for cidfile in \$(ls /var/lib/ventriloquist/cids/*); do
      docker start \$(cat \$cidfile)
    done
  fi
end script
respawn
EOF'
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ventriloquist-0.3.0 lib/ventriloquist/cap/debian/ventriloquist_containers_upstart.rb
ventriloquist-0.2.1 lib/ventriloquist/cap/debian/ventriloquist_containers_upstart.rb
ventriloquist-0.2.0 lib/ventriloquist/cap/debian/ventriloquist_containers_upstart.rb
ventriloquist-0.1.0 lib/ventriloquist/cap/debian/ventriloquist_containers_upstart.rb