#!/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 "$@"