Files
proxmox-authelia/start_authelia.sh

22 lines
686 B
Bash

#!/bin/bash
# start_authelia.sh
# Wrapper script to load secrets and launch Authelia
# 1. Source the secret file silently
set -a
if [ -f /mnt/secrets/redis.env ]; then
. /mnt/secrets/redis.env
else
echo "ERROR: Redis secret file not found at /mnt/secrets/redis.env"
exit 1
fi
set +a
# 2. Map the Redis password to the specific variable Authelia expects
# This allows us to leave the 'password' field out of configuration.yml entirely
export AUTHELIA_SESSION_REDIS_PASSWORD="$REDIS_PASSWORD"
# 3. Start Authelia
# We use 'exec' so this script is replaced by the Authelia process (better for signal handling)
exec /usr/bin/authelia --config /etc/authelia/configuration.yml