更新 noderedeploy.sh

This commit is contained in:
chunzhi 2024-07-29 20:26:24 +08:00
parent ca5f582c0f
commit 61987e740f

View File

@ -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"