docker-perkeep/docker-entrypoint.sh
RouxAntoine cda632115d
All checks were successful
Main / build (push) Successful in 29m22s
feature: move perkeep template configuration out of config folder
2023-12-25 23:50:36 +01:00

23 lines
681 B
Bash

#!/bin/sh
if [ "T$PASSWORD" == "T" ];
then
return 1;
fi
if [ "T$SECRING" != "T" ] && [ "T$IDENTITY" != "T" ];
then
echo "$SECRING" > /perkeep/config/identity-secring.gpg
envsubst < /perkeep/server-config-custom.tpl.json > /perkeep/config/server-config-custom.json
fi
if [ ! -f /perkeep/config/identity-secring.gpg ];
then
pk put init -newkey
mv perkeep/.config/perkeep/identity-secring.gpg /perkeep/config/
export IDENTITY=$(sed -n -e '/identity/ s/.*:.*"\(.*\)".*/\1/p' /perkeep/.config/perkeep/client-config.json | tee /dev/tty)
envsubst < /perkeep/server-config-custom.tpl.json > /perkeep/config/server-config-custom.json
rm -r /perkeep/.config
fi
exec "$@"