<% if @before_start -%>
    <%= @before_start %>
<% end -%>
<% if @remove_container_on_start -%>
    /usr/bin/<%= @docker_command %> rm <% if @remove_volume_on_start %>-v<% end %> <%= @sanitised_title %> >/dev/null 2>&1
<% end -%>

<% if @pull_on_start -%>
    /usr/bin/<%= @docker_command %> pull <%= @image %>
<% end -%>

/usr/bin/<%= @docker_command %> create \
<%= @docker_run_flags %> \
--name <%= @sanitised_title %> \
<%= @image %> <% if @command %> \ <%= @command %><% end %>

<% if @after_create %><%= @after_create %><% end %>
<% if @net.is_a? Array%>
  <% @net.each do |n| %>
/usr/bin/<%= @docker_command %> network connect <%= n %> <%= @sanitised_title %>
  <% end %>
<% end %>

/usr/bin/<%= @docker_command %> start <% if ! @valid_detach %>-a<% end %> <%= @sanitised_title %>
<% if @after_start -%>
    <%= @after_start %>
<% end -%>

<% if @before_start -%>
    <%= @before_start %>
<% end -%>
<% if @remove_container_on_start -%>
    /usr/bin/<%= @docker_command %> rm <% if @remove_volume_on_start %>-v<% end %> <%= @sanitised_title %> >/dev/null 2>&1
<% end -%>

<% if @pull_on_start -%>
    /usr/bin/<%= @docker_command %> pull <%= @image %>
<% end -%>

/usr/bin/<%= @docker_command %> create \
<%= @docker_run_flags %> \
--name <%= @sanitised_title %> \
<%= @image %> <% if @command %> \
<%= @command %><% end %>

<% if @after_create %><%= @after_create %><% end %>
<% if @net.is_a? Array%>
  <% @net.each do |n| %>
/usr/bin/<%= @docker_command %> network connect <%= n %> <%= @sanitised_title %>
  <% end %>
<% end %>

/usr/bin/<%= @docker_command %> start <% if ! @valid_detach %>-a<% end %> <%= @sanitised_title %>
<% if @after_start -%>
    <%= @after_start %>
<% end -%>

Fix misplaced backslash in start template
Fix misplaced backslash in start template

During a recent refactor a backslash intended to be an end of line
escape was inadvertantly placed into the middle of a line when a
container command is specified. This fix reinserts the newline the
slash was meant to escape.

Fixes #661
