From af4e73ccc0edb145da176c766bbf2bf20644a417 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eugene=20=E2=80=9CAeron=E2=80=9D=20Glybin?= Date: Wed, 22 Jun 2022 18:50:12 +0700 Subject: [PATCH] Entrypoint update Empty secrets file now handles properly as well. --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 6443c4b..b7e90cc 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -22,7 +22,7 @@ compile_profile() { } get_secret() { - if [ ! -f /etc/ipsec.secrets ]; then + if [ ! -f /etc/ipsec.secrets ] || [ ! -s /etc/ipsec.secrets ]; then echo ": PSK '$(openssl rand -base64 32)'" > /etc/ipsec.secrets fi