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