#!/bin/bash
#
# Copyright 2019-2020 VMware, Inc.  All rights reserved.
#
# This script manages the VMware URL redirection filter application
#

libpath="/usr/lib/vmware"
binpath="/usr/lib/vmware/view/bin"

# Add path to LD_LIBRARY_PATH
vm_append_to_library_path() {
   local ldBasePath
   if [ ! -z "$LD_LIBRARY_PATH" ]; then
      ldBasePath="$LD_LIBRARY_PATH"
   fi
   export LD_LIBRARY_PATH="$1:""$ldBasePath"
}

vm_append_to_library_path "$libpath"/gcc

# Launch vmware url filter binary
"$binpath/vmware-urlFilter" "$@" &
