From 61987e740f5a55baa446ec268c6b780f7b13ed40 Mon Sep 17 00:00:00 2001 From: chunzhi Date: Mon, 29 Jul 2024 20:26:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20noderedeploy.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- noderedeploy.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/noderedeploy.sh b/noderedeploy.sh index 38379a8..b36b1a9 100644 --- a/noderedeploy.sh +++ b/noderedeploy.sh @@ -32,8 +32,8 @@ if [ ! -d "/usr/local/goedge" ]; then unzip -o edge-node-linux-amd64-plus.zip # Create or overwrite api_node.yaml from the template - if [ -d "$edge_node_path/configs" ]; then - cp "$edge_node_path/configs/api_node.template.yaml" "$edge_node_path/configs/api_node.yaml" + if [ -d "./configs" ]; then + cp "./configs/api_node.template.yaml" "$edge_node_path/configs/api_node.yaml" else echo "Configuration directory does not exist. Exiting." exit 1 @@ -44,7 +44,6 @@ if [ ! -d "/usr/local/goedge" ]; then read -p "Enter rpc.endpoints: " rpc_endpoints read -p "Enter nodeId: " node_id read -p "Enter secret: " secret - # Insert configuration into api_node.yaml echo "rpc.endpoints: [\"$rpc_endpoints\"]" > "$edge_node_path/configs/api_node.yaml" echo "nodeId: \"$node_id\"" >> "$edge_node_path/configs/api_node.yaml"