home_data/influx/scripts/create_tokens.sh

10 lines
280 B
Bash
Executable File

#!/bin/bash
set -e
echo "Creating tokens for ${DOCKER_INFLUXDB_INIT_ORG} organization"
influx auth create \
--org ${DOCKER_INFLUXDB_INIT_ORG} \
--read-buckets \
--write-buckets | tail -1 | awk '{print $2}' > /tokens/read_write.txt
echo "Read/Write token created"