Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mithril mkdir in scripts for existing deployments #1702

Merged
merged 2 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 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 Expand Up @@ -169,6 +176,10 @@ while getopts :duh opt; do
usage
exit 1
;;
*)
usage
exit 1
;;
esac
done

Expand Down
4 changes: 4 additions & 0 deletions scripts/cnode-helper-scripts/mithril-relay.sh
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,10 @@ while getopts :dlh opt; do
usage
exit 1
;;
*)
usage
exit 1
;;
esac
done

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