Skip to content

Commit

Permalink
add: ask to copy keystore
Browse files Browse the repository at this point in the history
  • Loading branch information
debendraoli committed Nov 8, 2024
1 parent a496003 commit db87b89
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ else
fi

# RELAYER CONFIG_PATH
read -p "Enter relayer config (path to config.yaml) [./config.yaml]: " CONFIG_PATH
CONFIG_PATH=${CONFIG_PATH:-./config.yaml}
read -p "Enter relayer config (path to config.yaml) [$HOME/.centralized-relay/config.yaml]: " CONFIG_PATH
CONFIG_PATH=${CONFIG_PATH:-$HOME/.centralized-relay/config.yaml}

# Check if CONFIG_PATH exists
if [[ ! -f "${CONFIG_PATH}" ]]; then
Expand All @@ -123,6 +123,15 @@ fi
echo "Copying ${CONFIG_PATH} to ${CONFIG_DIR}/config.yaml"
cp "${CONFIG_PATH}" "${CONFIG_DIR}/config.yaml"

if [[ -d "$HOME/.centralized-relay/keystore" ]]; then
read -p "Copy keystore to ${CONFIG_DIR}/relayer/data/keystore? (yes/no) [no]: " COPY_KEYSTORE
COPY_KEYSTORE=${COPY_KEYSTORE:-no}
if [[ "${COPY_KEYSTORE}" == "yes" || "${COPY_KEYSTORE}" == "y" ]]; then
mkdir -p "${CONFIG_DIR}/relayer/data/keystore"
cp -r "$HOME/.centralized-relay/keystore" "${CONFIG_DIR}/relayer/data/keystore"
fi
fi

# Create .env file
cat <<EOF > "${CONFIG_DIR}/.env"
CONFIG=${CONFIG}
Expand Down

0 comments on commit db87b89

Please sign in to comment.