From 6713c87fde30bd7150c43a4e6b440ad042027e18 Mon Sep 17 00:00:00 2001 From: Hamza Khalid Date: Thu, 5 Dec 2024 12:43:51 +0500 Subject: [PATCH] Update Entrypoint --- packages/ciphernode/ciphernode-entrypoint.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/ciphernode/ciphernode-entrypoint.sh b/packages/ciphernode/ciphernode-entrypoint.sh index e31a1193..2f6d0711 100644 --- a/packages/ciphernode/ciphernode-entrypoint.sh +++ b/packages/ciphernode/ciphernode-entrypoint.sh @@ -4,7 +4,6 @@ set -e # Paths to config and secrets CONFIG_FILE="$CONFIG_DIR/config.yaml" SECRETS_FILE="$SECRETS_DIR/secrets.json" -KEYFILE="$CONFIG_DIR/key" AGGREGATOR="$AGGREGATOR" # Ensure required files exist @@ -30,13 +29,12 @@ fi # Set password and private key echo "Setting password" enclave password create --config "$CONFIG_FILE" --password "$PASSWORD" + if [ "$AGGREGATOR" = "true" ]; then - if [ -f "$KEYFILE" ]; then - echo "Setting private key" - enclave wallet set --config "$CONFIG_FILE" --private-key "$PRIVATE_KEY" - fi + echo "Setting private key" + enclave wallet set --config "$CONFIG_FILE" --private-key "$PRIVATE_KEY" + echo "Starting aggregator" - # Start the aggregator exec enclave aggregator start --config "$CONFIG_FILE" else echo "Starting Ciphernode"