From 9b248e279c32b9cd0e92dd507b43032c7fc58895 Mon Sep 17 00:00:00 2001 From: buildplan Date: Mon, 30 Jun 2025 13:26:43 +0100 Subject: [PATCH 1/2] little things --- du_setup.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/du_setup.sh b/du_setup.sh index 33274e7..5137511 100644 --- a/du_setup.sh +++ b/du_setup.sh @@ -1102,8 +1102,8 @@ install_tailscale() { if $CONNECTED; then print_success "Tailscale reconfigured with additional options. Node IPv4 in tailnet: $TS_IPV4" log "Tailscale reconfigured: $TS_COMMAND" - # Store flags and IPs for summary - echo "${TS_FLAGS// --/}" > /tmp/tailscale_flags + # Store flags and IPs for summary + echo "$TS_FLAGS" | sed 's/ --/ /g' | sed 's/^ *//' > /tmp/tailscale_flags echo "$TS_IPS" > /tmp/tailscale_ips.txt else print_warning "Tailscale reconfiguration attempt succeeded, but no IPs assigned." @@ -1659,6 +1659,7 @@ configure_security_audit() { log "Lynis installation failed." else print_info "Running Lynis audit (non-interactive mode, this will take a few minutes)..." + print_warning "Review audit results in $AUDIT_LOG for security recommendations." if lynis audit system --quick >> "$AUDIT_LOG" 2>&1; then print_success "Lynis audit completed. Check $AUDIT_LOG for details." log "Lynis audit completed successfully." @@ -1751,10 +1752,10 @@ generate_summary() { local TS_IPS TS_IPV4 TS_IPS=$(tailscale ip 2>/dev/null || echo "Unknown") TS_IPV4=$(echo "$TS_IPS" | grep -E '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$' | head -1 || echo "Unknown") - print_success "Service tailscaled is active and connected. Node IPv4 in tailnet: $TS_IPV4" + print_success "Service tailscaled is active and connected." echo "$TS_IPS" > /tmp/tailscale_ips.txt else - print_error "Service tailscaled is NOT active or not connected." + print_error "Service tailscaled is NOT active" FAILED_SERVICES+=("tailscaled") TS_COMMAND=$(grep "Tailscale connection failed: tailscale up" "$LOG_FILE" | tail -1 | sed 's/.*Tailscale connection failed: //') TS_COMMAND=${TS_COMMAND:-"tailscale up --operator=$USERNAME"} @@ -1801,7 +1802,9 @@ generate_summary() { fi if command -v tailscale >/dev/null 2>&1; then local TS_SERVER=$(cat /tmp/tailscale_server 2>/dev/null || echo "https://controlplane.tailscale.com") - local TS_IPS=$(cat /tmp/tailscale_ips.txt 2>/dev/null || echo "Not connected") + local TS_IPS_RAW=$(cat /tmp/tailscale_ips.txt 2>/dev/null || echo "Not connected") + # --- FIX: Format IPs to be on a single line --- + local TS_IPS=$(echo "$TS_IPS_RAW" | paste -sd ", " -) local TS_FLAGS=$(cat /tmp/tailscale_flags 2>/dev/null || echo "None") echo -e " Tailscale: ${GREEN}Enabled${NC}" printf " %-16s%s\n" "- Server:" "$TS_SERVER" @@ -1837,7 +1840,7 @@ generate_summary() { fi if [[ -f /root/run_backup.sh ]]; then echo -e " Remote Backup:" - printf " %-18s${CYAN}%s${NC}\n" "- Verify SSH key:" "cat /root/.ssh/id_ed25519.pub" + printf " %-18s${CYAN}%s${NC}\n" "- Verify SSH key:" "sudo cat /root/.ssh/id_ed25519.pub" printf " %-18s${CYAN}%s${NC}\n" "- Copy key if needed:" "ssh-copy-id -p $BACKUP_PORT -s $BACKUP_DEST" printf " %-18s${CYAN}%s${NC}\n" "- Test backup:" "sudo /root/run_backup.sh" printf " %-18s${CYAN}%s${NC}\n" "- Check logs:" "sudo less $BACKUP_LOG" From c5e737259dc86eb48e30060034ededf03ff6ccc7 Mon Sep 17 00:00:00 2001 From: buildplan Date: Mon, 30 Jun 2025 13:39:37 +0100 Subject: [PATCH 2/2] little things --- README.md | 2 +- du_setup.sh.sha256 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0473c42..06227de 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ sha256sum du_setup.sh Compare the output hash to the one below. They must match exactly. -`91e0cd8daf4550c0c51733ad06dda7b6034a6084ee897371736c8414d0b5f02c` +`fa2bbc20e5e658ed0a485d9bcb78f7c2f28501ed4363f759f1dd2bb75a395e58` ### 3\. Run the Script diff --git a/du_setup.sh.sha256 b/du_setup.sh.sha256 index 01f327a..e8503d2 100644 --- a/du_setup.sh.sha256 +++ b/du_setup.sh.sha256 @@ -1 +1 @@ -91e0cd8daf4550c0c51733ad06dda7b6034a6084ee897371736c8414d0b5f02c du_setup.sh +fa2bbc20e5e658ed0a485d9bcb78f7c2f28501ed4363f759f1dd2bb75a395e58 du_setup.sh