From 1f275b3c64277372d7d9eae41ac96ba750ead7c1 Mon Sep 17 00:00:00 2001 From: Teal Dulcet Date: Fri, 2 Nov 2018 01:07:15 -0700 Subject: [PATCH] Added comments to scripts. --- setup/bootstrap.sh | 1 + setup/questions.sh | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/setup/bootstrap.sh b/setup/bootstrap.sh index 3901a8b0..a9ec9d96 100644 --- a/setup/bootstrap.sh +++ b/setup/bootstrap.sh @@ -3,6 +3,7 @@ # This script is intended to be run like this: # # wget https://mailinabox.email/setup.sh -qO - | sudo bash -s +# or # curl -s https://mailinabox.email/setup.sh | sudo bash -s # ######################################################### diff --git a/setup/questions.sh b/setup/questions.sh index cc1e0b8b..598c5bf4 100644 --- a/setup/questions.sh +++ b/setup/questions.sh @@ -77,7 +77,9 @@ address, so we're suggesting $DEFAULT_PRIMARY_HOSTNAME. $DEFAULT_PRIMARY_HOSTNAME \ PRIMARY_HOSTNAME + # Regular expression to check if the hostname is of the form *.localdomain RE='^.+\.localdomain$' + # Regular expressions to check if the hostname is a valid FQDN RE1='^.{4,253}$' RE2='^([[:alnum:]][[:alnum:]\-]{0,61}[[:alnum:]]\.)+[a-zA-Z]{2,63}$' if [ -z "$PRIMARY_HOSTNAME" ]; then @@ -208,7 +210,7 @@ if [ -n "$CPU" ]; then fi CPU_CORES=$(nproc --all) echo -e "CPU Cores:\t\t\t$CPU_CORES" -echo -e "Architecture:\t\t\t$HOSTTYPE ($ARCHITECTURE-bit)" +echo -e "Architecture:\t\t\t$HOSTTYPE (${ARCHITECTURE}-bit)" echo -e "Total memory (RAM):\t\t$(printf "%'d" $((TOTAL_PHYSICAL_MEM / 1024))) MiB ($(printf "%'d" $((((TOTAL_PHYSICAL_MEM * 1024) / 1000) / 1000))) MB)" echo -e "Total swap space:\t\t$(printf "%'d" $((TOTAL_SWAP / 1024))) MiB ($(printf "%'d" $((((TOTAL_SWAP * 1024) / 1000) / 1000))) MB)" if command -v lspci >/dev/null; then