From 4a56d764aed6f5239cc593558ca54ef38bdc06b8 Mon Sep 17 00:00:00 2001 From: dappnodedev <144998261+dappnodedev@users.noreply.github.com> Date: Fri, 23 Aug 2024 11:20:46 +0200 Subject: [PATCH] Parse numbers in operator config (#7) --- operator/entrypoint.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/operator/entrypoint.sh b/operator/entrypoint.sh index aa6f19a..871889e 100755 --- a/operator/entrypoint.sh +++ b/operator/entrypoint.sh @@ -117,6 +117,12 @@ create_operator_config() { rm -f "${raw_json_config_file}" "${modified_json_config_file}" } +# Parses numbers between quotes into integers +parse_numbers_in_operator_config() { + echo "[INFO] Parsing numbers in the operator config..." + sed -i "s/'\([0-9]\+\)'/\1/g" "${NODE_CONFIG_FILE}" +} + start_operator() { echo "[INFO] Starting SSV operator..." @@ -145,6 +151,7 @@ main() { handle_private_key post_pubkey_to_dappmanager create_operator_config + parse_numbers_in_operator_config start_operator }