#!/bin/bash

if [ "x$1" == "x" ];then
  echo "Stage as param \$1 is missing. exit"
  exit 1
fi


docker run -v `pwd`/templates/elastic-certs:/certs -v `pwd`/templates/elastic-certs/$1-instances.yaml:/usr/share/elasticsearch/config/certificates/$1-instances.yml docker.elastic.co/elasticsearch/elasticsearch:7.12.0 /bin/sh "/certs/certutil.sh" $1
