anchor.diff:  LOGFILE="/var/log/$NAME.log"
   
   get_pid() {
  -    pgrep -f <%= @consul_binary %>
  +    cat "$PIDFILE"
   }
   
   is_running() {
  -    ps "`get_pid`" > /dev/null 2>&1
  +    [ -f "$PIDFILE" ] && ps `get_pid` > /dev/null 2>&1
   }
   
   case "$1" in
  
positive.code:     else
          echo "Starting $NAME"
          $CMD >> "$LOGFILE" &
          if ! is_running; then
              echo "Unable to start $NAME, see $LOGFILE"
              exit 1
  
negative.code:             exit 1
          else
              echo "$NAME stopped"
              if [ -f "$PIDFILE" ]; then
                  rm "$PIDFILE"
              fi
          fi
      else
          echo "$NAME not running"
  