mirror of
https://github.com/icodex/docker-goedge.git
synced 2026-03-13 21:41:37 -05:00
21 lines
423 B
Bash
Executable File
21 lines
423 B
Bash
Executable File
#!/usr/bin/env sh
|
|
|
|
. /build/set_hosts.sh
|
|
|
|
function pre_config() {
|
|
if [ ! -e ${ROOT_DIR}/edge-user/configs/api_user.yaml ]; then
|
|
touch ${ROOT_DIR}/edge-user/configs/api_user.yaml
|
|
cat >> ${ROOT_DIR}/edge-user/configs/api_user.yaml << EOF
|
|
rpc.endpoints: [ "${ENDPOINTS}" ]
|
|
nodeId: "${NODEID}"
|
|
secret: "${SECRET}"
|
|
EOF
|
|
fi
|
|
}
|
|
|
|
ROOT_DIR='/usr/local/goedge'
|
|
|
|
set_hosts
|
|
pre_config
|
|
${ROOT_DIR}/edge-user/bin/edge-user
|