Created
February 12, 2020 23:50
-
-
Save octavian-nita/a20ecfe365ccd6fcf6f91441e4f8c7a2 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
#!/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} & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use this for dev/test environments only.
In production environments, do use services, like described here!