Skip to content

Commit

Permalink
mkdir in generate for existing guild environments
Browse files Browse the repository at this point in the history
  • Loading branch information
TrevorBenson committed Nov 15, 2023
1 parent 0f0b938 commit b694217
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scripts/cnode-helper-scripts/mithril-client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
# Do NOT modify code below #
######################################

U_ID=$(id -u)
G_ID=$(id -g)

#####################
# Functions #
#####################
Expand All @@ -34,6 +37,10 @@ usage() {


generate_environment_file() {
if [[ ! -d "${CNODE_HOME}/mithril/data-stores" ]]; then
sudo mkdir -p "${CNODE_HOME}"/mithril/data-stores
sudo chown -R "$U_ID":"$G_ID" "${CNODE_HOME}"/mithril 2>/dev/null
fi
if [[ -n "${POOL_NAME}" ]] && [[ "${POOL_NAME}" != "CHANGE_ME" ]]; then
export ERA_READER_ADDRESS=https://raw.githubusercontent.com/input-output-hk/mithril/main/mithril-infra/configuration/${RELEASE}-${NETWORK_NAME,,}/era.addr
export ERA_READER_VKEY=https://raw.githubusercontent.com/input-output-hk/mithril/main/mithril-infra/configuration/${RELEASE}-${NETWORK_NAME,,}/era.vkey
Expand Down
7 changes: 7 additions & 0 deletions scripts/cnode-helper-scripts/mithril-signer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
# Do NOT modify code below #
######################################

U_ID=$(id -u)
G_ID=$(id -g)

#####################
# Functions #
#####################
Expand Down Expand Up @@ -71,6 +74,10 @@ get_relay_endpoint() {
}

generate_environment_file() {
if [[ ! -d "${CNODE_HOME}/mithril/data-stores" ]]; then
sudo mkdir -p "${CNODE_HOME}"/mithril/data-stores
sudo chown -R "$U_ID":"$G_ID" "${CNODE_HOME}"/mithril 2>/dev/null
fi
# Inquire about the relay endpoint
read -r -p "Are you using a relay endpoint? (y/n, press Enter to use default y): " ENABLE_RELAY_ENDPOINT
ENABLE_RELAY_ENDPOINT=${ENABLE_RELAY_ENDPOINT:-y}
Expand Down

0 comments on commit b694217

Please sign in to comment.