Skip to content

Commit

Permalink
load_configs for the appropriate network
Browse files Browse the repository at this point in the history
  • Loading branch information
TrevorBenson committed Apr 11, 2024
1 parent efab9bf commit 679e8a3
Showing 1 changed file with 12 additions and 23 deletions.
35 changes: 12 additions & 23 deletions files/docker/node/addons/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,33 +42,22 @@ find /opt/cardano/cnode/files -name "*config*.json" -print0 | xargs -0 sed -i 's
return 0
}

export UPDATE_CHECK='N'
load_configs () {
cp -rf /conf/"${NETWORK}"/* /opt/cardano/cnode/files/
}

if [[ "$NETWORK" == "mainnet" ]]; then
$CNODE_HOME/scripts/guild-deploy.sh -n mainnet -u -s f > /dev/null 2>&1 \
&& customise \
&& exec $CNODE_HOME/scripts/cnode.sh
elif [[ "$NETWORK" == "preprod" ]]; then
$CNODE_HOME/scripts/guild-deploy.sh -n preprod -u -s f > /dev/null 2>&1 \
&& customise \
&& exec $CNODE_HOME/scripts/cnode.sh
elif [[ "$NETWORK" == "preview" ]]; then
$CNODE_HOME/scripts/guild-deploy.sh -n preview -u -s f > /dev/null 2>&1 \
&& customise \
&& exec $CNODE_HOME/scripts/cnode.sh
elif [[ "$NETWORK" == "guild-mainnet" ]]; then
$CNODE_HOME/scripts/guild-deploy.sh -n mainnet -u -s f > /dev/null 2>&1 \
&& bash /home/guild/.scripts/guild-topology.sh > /dev/null 2>&1 \
&& export TOPOLOGY="${CNODE_HOME}/files/guildnet-topology.json" \
&& customise \
&& exec $CNODE_HOME/scripts/cnode.sh
elif [[ "$NETWORK" == "guild" ]]; then
$CNODE_HOME/scripts/guild-deploy.sh -n guild -u -s f > /dev/null 2>&1 \
&& customise \
&& exec $CNODE_HOME/scripts/cnode.sh
if [[ -n "${NETWORK}" ]] ; then
if [[ "${UPDATE_CHECK}" == "Y" ]] ; then
"$CNODE_HOME"/scripts/guild-deploy.sh -n "$NETWORK" -u -s f > /dev/null 2>&1
else
load_configs
fi
else
echo "Please set a NETWORK environment variable to one of: mainnet / preview / preprod / guild-mainnet / guild"
echo "mount a '$CNODE_HOME/priv/files' volume containing: mainnet-config.json, mainnet-shelley-genesis.json, mainnet-byron-genesis.json, and mainnet-topology.json "
echo "for active nodes set POOL_DIR environment variable where op.cert, hot.skey and vrf.skey files reside. (usually under '${CNODE_HOME}/priv/pool/$POOL_NAME' ) "
echo "or just set POOL_NAME environment variable (for default path). "
fi

customise \
&& exec "$CNODE_HOME"/scripts/cnode.sh

0 comments on commit 679e8a3

Please sign in to comment.