#!/bin/bash
#
# Copyright (c) Omnissa, LLC. All rights reserved.
# This product is protected by copyright and intellectual property laws in the
# United States and other countries as well as by international treaties.
# -- Omnissa Restricted
#
# This script manages the Horizon URL redirection filter application
#

libpath="/usr/lib/omnissa"
binpath="/usr/lib/omnissa/horizon/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 horizon url filter binary
"$binpath/horizon-urlFilter" "$@" &
