Skip to content
This repository was archived by the owner on Jul 27, 2024. It is now read-only.

Commit 074e0db

Browse files
committed
Added domain provided check to ubuntu install script
Related to #30
1 parent 6b784d8 commit 074e0db

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

scripts/installation-ubuntu-20.04.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ printf "Enter the domain you want to host BookStack and press [ENTER]\nExamples:
1212
read -r DOMAIN
1313
fi
1414

15+
# Ensure a domain was provided otherwise display
16+
# an error message and stop the script
17+
if [ -z "$DOMAIN" ]
18+
then
19+
>&2 echo 'ERROR: A domain must be provided to run this script'
20+
exit 1
21+
fi
22+
1523
# Get the current machine IP address
1624
CURRENT_IP=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
1725

0 commit comments

Comments
 (0)