Created
April 21, 2014 18:16
-
-
Save mcm/11151317 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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