Update 20-config

The addition of $PEERPORT and $WEBUI would allow users to specify these ports via environmental variables, and add flexibility.
This commit is contained in:
Jeff R
2021-10-21 13:36:43 -04:00
committed by Ryan Kuba
parent 26706dba6c
commit cf6cb742b0

View File

@@ -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 \