anchor.diff:  #! /usr/bin/env bash
  +
  +set -e -x
   
   ### BEGIN INIT INFO
   # Provides:          influxd
  
positive.code: # In the third case we have to define our own functions which are very dumb
  # and expect the args to be positioned correctly.
  
  if [ -r /lib/lsb/init-functions ]; then
      source /lib/lsb/init-functions
  fi
  
  if [ "x$STDOUT" == "x" ]; then
      STDOUT=/dev/null
  fi
  
  OPEN_FILE_LIMIT=65536
  
negative.code: 
          log_success_msg "Starting the process" "$name"
          if which start-stop-daemon > /dev/null 2>&1; then
              start-stop-daemon --chuid vcap:vcap --start --quiet --pidfile $pidfile --exec $daemon -- -pidfile $pidfile -config $config &
          else
              nohup $daemon run -config $config -pidfile $pidfile &
          fi
          log_success_msg "$name process was started"
  
          until nc -w 1 127.0.0.1 8086 </dev/null; do
              echo "$(date): waiting for influxd..."
              sleep 1
          done
  
          $bootstrapper \
              -user <%= p('influxdb.user') %> \
              -password <%= p('influxdb.password') %> \
              -database <%= p('influxdb.database') %> \
              -retention <%= p('influxdb.retention') %> \
              -replication <%= p('influxdb.replication') %>
  
          if [ $? -ne 0 ]; then
            log_failure_msg "failed to boostrap db"
  