#!/bin/bash #set -x set -e echo "Welcome to Autocert configuration. Press any key to begin." read ANYKEY STEPPATH=/home/step/.step CA_PASSWORD=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32 ; echo '') AUTOCERT_PASSWORD=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32 ; echo '') step ca init \ --name "$CA_NAME" \ --dns "$CA_DNS" \ --address "$CA_ADDRESS" \ --provisioner "$CA_DEFAULT_PROVISIONER" \ --with-ca-url "$CA_URL" \ --password-file <(echo "$CA_PASSWORD") echo echo -e "\e[1mCreating autocert provisioner...\e[0m" expect <