From b29e1085ef3d98d8b5d8eb9d3f2033bbc210e2fc Mon Sep 17 00:00:00 2001 From: Kithmini Gunawardhana Date: Thu, 8 Feb 2024 17:37:55 +0530 Subject: [PATCH] Existing configuration verification (#347) --- installer/setup.sh | 48 ++++++++++++++++++++++++++++++++++++++------ mb-xrpl/lib/setup.js | 5 +++-- 2 files changed, 45 insertions(+), 8 deletions(-) diff --git a/installer/setup.sh b/installer/setup.sh index d5f57a9..23cea54 100755 --- a/installer/setup.sh +++ b/installer/setup.sh @@ -19,6 +19,7 @@ max_ipv6_prefix_len=112 evernode_alias=/usr/bin/evernode log_dir=/tmp/evernode + root_user="root" repo_owner="EvernodeXRPL" repo_name="evernode-resources" @@ -456,6 +457,11 @@ } + function validate_positive_integer() { + ! [[ $1 =~ ^[1-9][0-9]*$ ]] && return 1 + return 0 + } + function validate_positive_decimal() { ! [[ $1 =~ ^(0*[1-9][0-9]*(\.[0-9]+)?|0+\.[0-9]*[1-9][0-9]*)$ ]] && return 1 return 0 @@ -728,7 +734,7 @@ if confirm "Do you want to set an extra transaction fee to consider in case of network congestion?" "n"; then while true; do read -ep "Specify the affordable extra transaction fee (in XAH Drops): " fee