Files
Goedge/docker/build/run_node.sh

24 lines
480 B
Bash
Raw Permalink Normal View History

2024-02-24 23:33:41 +08:00
#!/usr/bin/env sh
2024-07-30 14:30:12 +08:00
. /build/set_hosts.sh
2024-02-24 23:33:41 +08:00
function pre_config() {
if [ ! -e ${ROOT_DIR}/edge-node/configs/api_cluster.yaml ]; then
touch ${ROOT_DIR}/edge-node/configs/api_cluster.yaml
cat >> ${ROOT_DIR}/edge-node/configs/api_cluster.yaml << EOF
rpc.endpoints: [ "${ENDPOINTS}" ]
clusterId: "${CLUSTERID}"
secret: "${SECRET}"
EOF
fi
}
2024-07-30 14:30:12 +08:00
ROOT_DIR='/usr/local/goedge'
2024-02-24 23:33:41 +08:00
mkdir -p /opt/cache
chmod 777 /opt/cache
2024-07-30 14:30:12 +08:00
set_hosts
2024-02-24 23:33:41 +08:00
pre_config
${ROOT_DIR}/edge-node/bin/edge-node