Files
2026-11-06 17:30:30 +03:00

9 lines
310 B
Bash
Executable File

#!/bin/sh
set -eu
ROOT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
mkdir -p "$ROOT_DIR/secrets"
if [ ! -s "$ROOT_DIR/secrets/grafana.env" ]; then
(umask 077; printf 'GF_SECURITY_ADMIN_PASSWORD=%s\n' "$(openssl rand -hex 16)" > "$ROOT_DIR/secrets/grafana.env")
echo "created secrets/grafana.env"
fi