From 0fa5f9fc1339be128661736d0d3f542bab7b3289 Mon Sep 17 00:00:00 2001 From: Xiaonan Shen Date: Sun, 16 Oct 2022 14:49:38 +0800 Subject: [PATCH] Fix entrypoint init fail issue --- build/entrypoint.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/build/entrypoint.sh b/build/entrypoint.sh index 1a88ed3..1931087 100644 --- a/build/entrypoint.sh +++ b/build/entrypoint.sh @@ -9,8 +9,11 @@ if [[ $1 == init ]]; then gpg --generate-key --batch /protonmail/gpgparams pass init pass-key - # Kill the other instance as only one can be running at a time - pkill protonmail-bridge + # Kill the other instance as only one can be running at a time. + # This allows users to run entrypoint init inside a running conainter + # which is useful in a k8s environment. + # || true to make sure this would not fail in case there is no running instance. + pkill protonmail-bridge || true # Login /protonmail/proton-bridge --cli $@