Skip to content

Instantly share code, notes, and snippets.

@octavian-nita
Created February 12, 2020 23:50
Show Gist options
  • Save octavian-nita/a20ecfe365ccd6fcf6f91441e4f8c7a2 to your computer and use it in GitHub Desktop.
Save octavian-nita/a20ecfe365ccd6fcf6f91441e4f8c7a2 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# Consider writing robust bash shell scripts ( http://mywiki.wooledge.org/ ;)
set -o nounset
# ----------------------
# Command line arguments
# ----------------------
#[[ $# -ge 1 ]] || { printf "\nusage:\n\t`basename ${BASH_SOURCE}` <arg-1> [<arg-2>] ...\n" 1>&2; return 1; }
#declare -a ARGC=( "$#" )
#declare -a ARGV=( "$@" )
# -------------
# Configuration
# -------------
declare -r CWD=`pwd`
declare -r DTS=`date +%Y-%m-%d-%H-%M-%S`
declare -r LOG=`basename $0`-${DTS}.log
declare -r ELASTICSEARCH_DIR=/usr/local/elastic/elasticsearch-7.6.0
declare -r ELASTICSEARCH_BIN=${ELASTICSEARCH_DIR}/bin/elasticsearch
declare -r KIBANA_DIR=/usr/local/elastic/kibana-7.6.0
declare -r KIBANA_BIN=${KIBANA_DIR}/bin/kibana
# ----
# Main
# ----
nohup bash ${ELASTICSEARCH_BIN} &>${LOG} &
nohup bash ${KIBANA_BIN} &>${LOG} &
@octavian-nita
Copy link
Author

Use this for dev/test environments only.

In production environments, do use services, like described here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment