Skip to content

Instantly share code, notes, and snippets.

@mcm
Created April 21, 2014 18:16
Show Gist options
  • Save mcm/11151317 to your computer and use it in GitHub Desktop.
Save mcm/11151317 to your computer and use it in GitHub Desktop.
#!/bin/bash
read auth_key
SPLUNK_TOK=$auth_key
export SPLUNK_TOK
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
export LD_LIBRARY_PATH=$script_dir
app_name="$( basename "$( dirname $script_dir)")"
app_dir=$SPLUNK_HOME/etc/apps/$app_name/bin
# Setup a temp directory
tmp=$( mktemp -d )
# Need this in the same directory as the bin
cp ${app_dir}/fw1-loggrabber.conf $tmp
(
cd $tmp
$SPLUNK_HOME/etc/apps/$app_name/bin/lea_loggrabber "$@" --appname $app_name
)
rm -rf $tmp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment