Skip to content

Instantly share code, notes, and snippets.

@Nosmadas
Last active August 7, 2016 11:09
Show Gist options
  • Save Nosmadas/d90d30c7c54bcfaba86aee903bd45b50 to your computer and use it in GitHub Desktop.
Save Nosmadas/d90d30c7c54bcfaba86aee903bd45b50 to your computer and use it in GitHub Desktop.
LogstashBash
while getopts :n:v:d:e:sh optname; do
case $optname in
e)
ENCODED_LOGSTASH_CONFIG=${OPTARG}
;;
s) #skip common install steps
SKIP_COMMON_INSTALL="YES"
;;
h) #show help
exit 2
;;
\?) #unrecognized option - show help
echo -e \\n"Option -${BOLD}$OPTARG${NORM} not allowed."
exit 2
;;
esac
done
mkdir /opt/logstash-install/
cd /opt/logstash-install/
wget https://gist.githubusercontent.com/Nosmadas/d162cbd29bda9c34ae3b37a8d14a436b/raw/b4a362e685083439a84c6c01ec92631fcc310c47/logstash-install-ubuntu.sh
#Install Logstash
bash ./logstash-install-ubuntu.sh -e $ENCODED_LOGSTASH_CONFIG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment