mirror of
https://github.com/icodex/docker-goedge.git
synced 2026-03-14 05:46:26 -05:00
21 lines
447 B
Bash
Executable File
21 lines
447 B
Bash
Executable File
#!/usr/bin/env sh
|
|
|
|
ROOT_DIR='/usr/local/goedge'
|
|
|
|
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
|
|
}
|
|
|
|
mkdir -p /opt/cache
|
|
chmod 777 /opt/cache
|
|
|
|
pre_config
|
|
${ROOT_DIR}/edge-node/bin/edge-node
|