From 7b729ee64e22bcd118854752e012ea481ecac30a Mon Sep 17 00:00:00 2001 From: Tan Chee Keong Date: Thu, 13 Aug 2026 16:34:47 +0800 Subject: [PATCH 1/4] fix public key display --- operator/Dockerfile | 2 +- operator/entrypoint.sh | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/operator/Dockerfile b/operator/Dockerfile index cb12ac0..0d855ec 100644 --- a/operator/Dockerfile +++ b/operator/Dockerfile @@ -17,7 +17,7 @@ COPY entrypoint.sh /usr/local/bin/entrypoint.sh ADD ${STAKER_SCRIPTS_URL}/dvt_lsd_tools.sh /etc/profile.d/ RUN apt-get update && \ - apt-get install -y curl && \ + apt-get install -y curl jq && \ apt-get clean && \ chmod +rx /etc/profile.d/dvt_lsd_tools.sh /usr/local/bin/entrypoint.sh diff --git a/operator/entrypoint.sh b/operator/entrypoint.sh index 4b9702b..8744734 100755 --- a/operator/entrypoint.sh +++ b/operator/entrypoint.sh @@ -53,6 +53,9 @@ if [ "${SETUP_MODE}" = "Import Operator" ]; then echo "[DEBUG] encrypted_private_key.json doesn't exist, restarting" exit 1 fi + + # Extract the public key from the imported encrypted_private_key.json + jq -r '.pubKey' "$KEY_FILE_PATH" > "$PUBLIC_KEY_FILE_PATH" fi # If New Operator, generate a new public-private key pair during the first time setup From e822d14183296c9e1bca7e2e51516b00b4273057 Mon Sep 17 00:00:00 2001 From: Tan Chee Keong Date: Wed, 19 Aug 2026 09:29:50 +0800 Subject: [PATCH 2/4] revise --- operator/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/operator/entrypoint.sh b/operator/entrypoint.sh index 8744734..8d874a0 100755 --- a/operator/entrypoint.sh +++ b/operator/entrypoint.sh @@ -55,7 +55,7 @@ if [ "${SETUP_MODE}" = "Import Operator" ]; then fi # Extract the public key from the imported encrypted_private_key.json - jq -r '.pubKey' "$KEY_FILE_PATH" > "$PUBLIC_KEY_FILE_PATH" + jq -r '.pubkey // .pubKey // empty' "$KEY_FILE_PATH" > "$PUBLIC_KEY_FILE_PATH" fi # If New Operator, generate a new public-private key pair during the first time setup From b1fcd184fb590b74c11dab7eb4b22f725ebfa1fe Mon Sep 17 00:00:00 2001 From: Tan Chee Keong Date: Wed, 19 Aug 2026 09:39:15 +0800 Subject: [PATCH 3/4] revise --- operator/entrypoint.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/operator/entrypoint.sh b/operator/entrypoint.sh index 8d874a0..f236c9a 100755 --- a/operator/entrypoint.sh +++ b/operator/entrypoint.sh @@ -55,7 +55,11 @@ if [ "${SETUP_MODE}" = "Import Operator" ]; then fi # Extract the public key from the imported encrypted_private_key.json - jq -r '.pubkey // .pubKey // empty' "$KEY_FILE_PATH" > "$PUBLIC_KEY_FILE_PATH" + PUBLIC_KEY=$(jq -r '.pubkey // .pubKey // empty' "$KEY_FILE_PATH") + # Only writing the file when non-empty + if [ -n "$PUBLIC_KEY" ]; then + printf '%s\n' "$PUBLIC_KEY" > "$PUBLIC_KEY_FILE_PATH" + fi fi # If New Operator, generate a new public-private key pair during the first time setup From d03015bfbe95a9a3c919c10d26ab62b0aa1b5f77 Mon Sep 17 00:00:00 2001 From: Tan Chee Keong Date: Wed, 19 Aug 2026 09:40:32 +0800 Subject: [PATCH 4/4] simplify --- operator/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/operator/entrypoint.sh b/operator/entrypoint.sh index f236c9a..1ba9704 100755 --- a/operator/entrypoint.sh +++ b/operator/entrypoint.sh @@ -58,7 +58,7 @@ if [ "${SETUP_MODE}" = "Import Operator" ]; then PUBLIC_KEY=$(jq -r '.pubkey // .pubKey // empty' "$KEY_FILE_PATH") # Only writing the file when non-empty if [ -n "$PUBLIC_KEY" ]; then - printf '%s\n' "$PUBLIC_KEY" > "$PUBLIC_KEY_FILE_PATH" + echo "$PUBLIC_KEY" > "$PUBLIC_KEY_FILE_PATH" fi fi