anchor.diff:  }
   
   stop() {
  -    if ! [ -f $cidfile ]; then
  -        failure
  -        echo
  -        printf "$cidfile does not exist.\n"
  -        exit 7
  -    else
  -        cid="$(cat $cidfile)"
  -        if [ -n $cid ]; then
  -            echo -n $"Stopping $prog: "
  -            $docker stop $(cat $cidfile)
  -            retval=$?
  -            [ $retval -eq 0 ] && rm -f $lockfile
  -            return $retval
  -        fi
  -    fi
  +    echo -n "Stopping $prog: "
  +    $docker stop <%= @sanitised_title %>
  +    $docker rm <%= @sanitised_title %>
  +    return $?
   }
   
   case "$1" in
  
positive.code:     stop
      ;;
      status)
          if [ "false" = "$($docker inspect --format='{{.State.Running}}' $(cat $cidfile))"  ] ; then
          echo $prog not running
          exit 1
      fi
      $docker inspect $(cat $cidfile)
      ;;
      restart|reload)
      stop
  
negative.code: start() {
      [ -x $docker ] || exit 5
  
      if [ "true" = "$($docker inspect --format='{{.State.Running}}' <%= @sanitised_title %>)" ]; then
         failure
         printf "Container <%= @sanitised_title %> is still running.\n"
         exit 7
      fi
  
      printf "Starting $prog:\t"
      $docker rm <%= @sanitised_title %> >/dev/null 2>&1
      <% if @pull_on_start -%>
          $docker pull <%= @image %>
      <% end -%>
      $docker run \
      <%= @docker_run_flags %> \
      --name <%= @sanitised_title %> \
      <% if @extra_parameters %><% @extra_parameters_array.each do |param| %>  \
          <%= param %> <% end %> \
      <% end -%> \
      <%= @image %> \
      <% if @command %> <%= @command %><% end %>
  
      retval=$?
      echo
      if [ $retval -eq 0 ]; then
          success
      else
          failure
  