forked from curiousfokker/helium-DIY-middleman
-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
dockersetup.sh
19 lines (18 loc) · 870 Bytes
/
dockersetup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
CONTAINER_ALREADY_STARTED="CONTAINER_ALREADY_STARTED_PLACEHOLDER"
if [ ! -e $CONTAINER_ALREADY_STARTED ]; then
touch $CONTAINER_ALREADY_STARTED
echo "-- First container startup --"
echo " {"\
" \"gateway_conf\": {" \
" \"gateway_ID\": \"${gateway_ID}\"," \
" \"server_address\": \"${server_address}\"," \
" \"serv_port_up\": ${serv_port_up}," \
" \"serv_port_down\": ${serv_port_down}" \
" }"\
" }" > /home/middleman/configs/config.json
echo "middleman_ENVs=\"${middleman_ENVs}\"" > /home/middleman/middleman.conf
cat /home/middleman/configs/config.json && cat /home/middleman/middleman.conf
else
echo "-- Not first container startup --"
fi
python3 /home/middleman/gateways2miners.py -p ${middleman_port} -c /home/middleman/configs/