#!/bin/bash LOCAL_IP=$(hostname --all-ip-addresses | awk '{ print $1 }') PUBLIC_IP=$(curl https://ipinfo.io/ip --silent) HOSTNAME=$(hostname) function main { # pds hostname must be the same as the hostname of the container if [[ "${PDS_HOSTNAME}" != "${HOSTNAME}" ]]; then echo "PDS_HOSTNAME must be the same as the hostname of the container" echo "Set the hostname for the container before running." echo "Current hostname: ${HOSTNAME}" echo "PDS_HOSTNAME: ${PDS_HOSTNAME}" exit 1 fi if [[ -z "${PDS_HOSTNAME}" ]]; then echo "No public DNS address specified" exit 1 fi if [[ -z "${PDS_JWT_SECRET}" ]]; then echo "PDS_JWT_SECRET not specified" exit 1 fi if [[ -z "${PDS_ADMIN_PASSWORD}" ]]; then echo "PDS_ADMIN_PASSWORD not specified" exit 1 fi if [[ -z "${PDS_PLC_ROTATION_KEY_K256_PRIVATE_KEY_HEX}" ]]; then echo "PDS_PLC_ROTATION_KEY_K256_PRIVATE_KEY_HEX not specified" exit 1 fi cat <