Skip to content

Instantly share code, notes, and snippets.

@hiddebraun
Created February 14, 2017 08:47
Show Gist options
  • Save hiddebraun/bfdd109c7dd6884ad6cebf5fe2c8b42b to your computer and use it in GitHub Desktop.
Save hiddebraun/bfdd109c7dd6884ad6cebf5fe2c8b42b to your computer and use it in GitHub Desktop.
Start and Stop scripts for Elasticsearch and Kibana
#!/bin/bash
CWD=`pwd`
ES_BIN="$CWD/es/bin/elasticsearch"
KIBANA_BIN="$CWD/kibana/bin/kibana"
echo "Starting Elastic Search"
$ES_BIN -d
echo "Starting Kibana"
$KIBANA_BIN -Q &
CWD=`pwd`
ES_BIN="$CWD/es/bin/elasticsearch"
KIBANA_BIN="$CWD/kibana/bin/kibana"
KIBANA_PID=`ps -A | grep -m1 kibana | awk '{print $1}'`
ES_PID=`ps -A | grep -m1 org.elasticsearch | awk '{print $1}'`
echo "Stopping Kibana"
kill -SIGTERM $KIBANA_PID
echo "Stopping Elastic Search"
kill -SIGTERM $ES_PID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment