Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
eason lau committed Feb 1, 2018
1 parent 23572f3 commit 76c0f9b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions auto_up_elk_service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ docker_compose_file=./$elk_version/docker-compose.yml
#platform_list
version_list=(5.3.1 5.6.3 6.0.1 6.1.2)

# Show usage if required param is missing.
usage() {
echo 'usage: ./up_service.sh <linux|mac> ' '<'${version_list[@]}'>' '<your_hostname>'
exit 0
}

# Check required param
check_param(){
if [ "$(echo $platform | tr [A-Z] [a-z] )" = "linux" ]; then
echo $platform
Expand All @@ -34,6 +36,7 @@ check_param(){
fi
}

# replace param and generate docker-compose file
replace_param_if_need() {
if [ "$(echo $platform | tr [A-Z] [a-z])" = "mac" ]; then
cat ./$elk_version/docker-compose.yml.docker_for_mac > $docker_compose_file
Expand All @@ -42,6 +45,8 @@ replace_param_if_need() {
cat ./$elk_version/docker-compose.yml.linux > $docker_compose_file
fi
}

# Start service user docker-compose file.
up_service(){
docker-compose -f ./$elk_version/docker-compose.yml up -d
}
Expand Down

0 comments on commit 76c0f9b

Please sign in to comment.