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

Added more checks to scripts and output more system information #1456

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Added comments to scripts.
  • Loading branch information
tdulcet committed Jul 26, 2019
commit 1f275b3c64277372d7d9eae41ac96ba750ead7c1
1 change: 1 addition & 0 deletions setup/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# This script is intended to be run like this:
#
# wget https://mailinabox.email/setup.sh -qO - | sudo bash -s
tdulcet marked this conversation as resolved.
Show resolved Hide resolved
# or
# curl -s https://mailinabox.email/setup.sh | sudo bash -s
#
#########################################################
Expand Down
4 changes: 3 additions & 1 deletion setup/questions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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$'
tdulcet marked this conversation as resolved.
Show resolved Hide resolved
# 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
Expand Down Expand Up @@ -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
Expand Down