#!/bin/bash
#  Properly set up environment and invoke the Lucid binary
#
#  Copyright (c) 2024 LucidLink. All rights reserved.
#

# get the script's directory
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

# add helper binaries in the PATH variable
export PATH=${DIR}/bin:$PATH

# set path to SSL certificates for Azure filespaces
if [ -z $SSL_CERT_DIR ]; then
    export SSL_CERT_DIR=/etc/ssl/certs/
fi

# run Lucid from the appropriate working directory
cd ${DIR} && exec ./Lucid.bin "$@"
