Skip to content

Instantly share code, notes, and snippets.

@BradGunnerSGT
Created May 1, 2014 21:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BradGunnerSGT/0c2f6eea8391680988ee to your computer and use it in GitHub Desktop.
Save BradGunnerSGT/0c2f6eea8391680988ee to your computer and use it in GitHub Desktop.
script runner to run logstash conf files
#!/bin/bash
BASEDIR=`dirname $0`/..
SCRIPT=`basename $0 .sh`
cd $BASEDIR
CMD=lib/logstash/bin/logstash
if [ -f conf/$SCRIPT ]; then
exec $CMD -f conf/$SCRIPT
fi
echo "Script file '$SCRIPT' not found"
exit 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment