Files
akpella/files/generate-secrets.service
T
2026-02-11 05:20:25 +02:00

11 lines
280 B
Desktop File

[Unit]
Description=Create secrets if they don't exist
ConditionPathExists=!/home/core/postgresql/secret
[Service]
Type=oneshot
ExecStart=/bin/bash -c 'echo "POSTGRES_PASSWORD=$(/usr/bin/openssl rand -base64 20)" > /home/core/postgresql/secret'
[Install]
WantedBy=sysinit.target