mirror of
https://github.com/kossakovsky/n8n-install.git
synced 2026-03-07 22:33:11 +00:00
Refactor caddy check in 03_generate_secrets.sh
- Moved the caddy availability check to a later point in the script after the installation process. - Improved script flow by ensuring caddy is checked only after attempting to install it, enhancing user experience.
This commit is contained in:
@@ -11,12 +11,6 @@ if ! command -v openssl &> /dev/null; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check for caddy
|
||||
if ! command -v caddy &> /dev/null; then
|
||||
log_error "caddy could not be found. Please ensure it is installed and available in your PATH." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# --- Configuration ---
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
||||
PROJECT_ROOT="$( cd "$SCRIPT_DIR/.." &> /dev/null && pwd )"
|
||||
@@ -61,6 +55,12 @@ curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | gpg --yes --
|
||||
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | tee /etc/apt/sources.list.d/caddy-stable.list
|
||||
apt install -y caddy
|
||||
|
||||
# Check for caddy
|
||||
if ! command -v caddy &> /dev/null; then
|
||||
log_error "caddy could not be found. Please ensure it is installed and available in your PATH." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Prompt for the domain name
|
||||
while true; do
|
||||
read -p "Enter the primary domain name for your services (e.g., example.com): " DOMAIN
|
||||
|
||||
Reference in New Issue
Block a user