#!/bin/bash # Copyright (c) 2020 Status Research & Development GmbH. Licensed under # either of: # - Apache License, version 2.0 # - MIT license # at your option. This file may not be copied, modified, or distributed except # according to those terms. set -e #################### # argument parsing # #################### ! getopt --test > /dev/null if [ ${PIPESTATUS[0]} != 4 ]; then echo '`getopt --test` failed in this environment.' exit 1 fi OPTS="h" LONGOPTS="help,nodes:,base-metrics-port:,config-file:" # default values NUM_NODES="10" BASE_METRICS_PORT="8008" CONFIG_FILE="prometheus.yml" print_help() { cat < "${CONFIG_FILE}" <> "${CONFIG_FILE}" <