Skip to content

Commit

Permalink
Update 20-config
Browse files Browse the repository at this point in the history
The addition of $PEERPORT and $WEBUI would allow users to specify these ports via environmental variables, and add flexibility.
  • Loading branch information
jeff47 authored and thelamer committed Feb 21, 2022
1 parent 26706db commit cf6cb74
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions root/etc/cont-init.d/20-config
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@ else
sed -i "/\"rpc-host-whitelist\"/c\ \"rpc-host-whitelist\": \"$HOST_WHITELIST\"," /config/settings.json
fi

if [ ! -z "${PEERPORT}" ]; then
sed -i "/\"peer-port\"/c\ \"peer-port\": ${PEERPORT}," /config/settings.json
sed -i '/peer-port-random-on-start/c\ "peer-port-random-on-start": false,' /config/settings.json
fi

if [ ! -z "${WEBUI}" ]; then
sed -i "/\"rpc-port\"/c\ \"rpc-port\": ${WEBUI}," /config/settings.json
fi


# permissions
chown abc:abc \
Expand Down

0 comments on commit cf6cb74

Please sign in to comment.