Skip to content

Commit

Permalink
update to bash
Browse files Browse the repository at this point in the history
  • Loading branch information
karlprieb committed Aug 16, 2024
1 parent 8e6c3a2 commit 2cc0a69
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ echo "5) Litestream - Provides continuous backup for SQLite databases"

echo ""
print_message "Please enter the numbers corresponding to the services you'd like to run (e.g., 1 2 3):"
read -r SERVICES_SELECTED
# read -r SERVICES_SELECTED
read -p "Selection: " SERVICES_SELECTED
echo ""

# Build a list of services to disable using profiles
Expand Down Expand Up @@ -154,7 +155,8 @@ echo "";

# Prompt for START_HEIGHT
print_question "By default, your node will sync from block 0. If you want to start from a specific block, enter the block number. Otherwise, leave it empty."
read -r START_HEIGHT
# read -r START_HEIGHT
read -p "START_HEIGHT: " START_HEIGHT
if [ -n "$START_HEIGHT" ]; then
update_or_add_env_var "START_HEIGHT" "$START_HEIGHT"
print_success "Your node will start syncing from block $START_HEIGHT"
Expand All @@ -165,7 +167,8 @@ echo ""

# Prompt for STOP_HEIGHT
print_question "Your node will sync indefinitely by default. If you want to stop at a specific block, enter the block number. Otherwise, leave it empty."
read -r STOP_HEIGHT
# read -r STOP_HEIGHT
read -p "STOP_HEIGHT: " STOP_HEIGHT
if [ -n "$STOP_HEIGHT" ]; then
update_or_add_env_var "STOP_HEIGHT" "$STOP_HEIGHT"
print_success "Your node will stop syncing at block $STOP_HEIGHT"
Expand All @@ -176,14 +179,15 @@ echo ""

# Step 6: Ask if the user wants the node to resolve ArNS names
print_question "Do you want your node to resolve ArNS names? (y/n)"
read -r RESOLVE_ARNS
# read -r RESOLVE_ARNS
read -p "RESOLVE_ARNS: " RESOLVE_ARNS

if [ "$RESOLVE_ARNS" = "y" ] || [ "$RESOLVE_ARNS" = "Y" ]; then
print_question "Please enter the domain that your node will use for resolving ArNS names (e.g., example.com)."
read -r ARNS_ROOT_HOST
if [ -n "$ARNS_ROOT_HOST" ]; then
update_or_add_env_var "ARNS_ROOT_HOST" "$ARNS_ROOT_HOST"

# Check if the resolver service was selected
if ! echo "$SERVICES_SELECTED" | grep -q "4"; then
print_message "You chose to resolve ArNS names, but the resolver service is not enabled. The resolver service is necessary for this feature."
Expand Down Expand Up @@ -298,4 +302,4 @@ print_message "AR.IO Node Repository: https://github.com/ar-io/ar-io-node"
print_message "AR.IO Node Overview Docs: https://docs.ar.io/gateways/ar-io-node/overview/"

echo ""
print_success "Congratulations for setting up your AR.IO node! Happy syncing! 🎉"
print_success "Congratulations for setting up your AR.IO node! Happy syncing! 🎉"

0 comments on commit 2cc0a69

Please sign in to comment.