36 lines
1.0 KiB
Bash
Executable File
36 lines
1.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -Eeuo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
INSTALLER_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
|
|
source "$SCRIPT_DIR/lib/logging.sh"
|
|
source "$SCRIPT_DIR/lib/errors.sh"
|
|
source "$SCRIPT_DIR/lib/utils.sh"
|
|
source "$SCRIPT_DIR/lib/checks.sh"
|
|
|
|
DRY_RUN=false
|
|
|
|
for arg in "$@"; do
|
|
case "$arg" in
|
|
--dry-run) DRY_RUN=true ;;
|
|
*) error_exit "Unbekannter Parameter: $arg" ;;
|
|
esac
|
|
done
|
|
|
|
load_config "$INSTALLER_ROOT/config/installer.conf"
|
|
|
|
log_info "Tuxflotte Installer gestartet"
|
|
log_info "Installer Root: $INSTALLER_ROOT"
|
|
|
|
[[ "$DRY_RUN" == true ]] && log_warn "Dry-Run aktiv"
|
|
|
|
run_module "$SCRIPT_DIR/modules/00_preflight.sh" "always"
|
|
run_module "$SCRIPT_DIR/modules/05_network.sh" "always"
|
|
run_module "$SCRIPT_DIR/modules/10_hardware.sh" "always"
|
|
run_module "$SCRIPT_DIR/modules/15_server_handshake.sh" "always"
|
|
run_module "$SCRIPT_DIR/modules/20_storage.sh" "dry-run-safe"
|
|
run_module "$SCRIPT_DIR/modules/99_finish.sh" "always"
|
|
|
|
log_success "Tuxflotte Installer abgeschlossen"
|