homelab infrastructure services

Use consistent logging in fresh-install.sh

- Add log() function for consistent output formatting
- Replace all echo statements with log() calls
- Matches logging style of other tinsnip scripts
- Clearer output with [Fresh Install] prefix

+11 -7
+11 -7
fresh-install.sh
··· 5 5 6 6 set -euo pipefail 7 7 8 - echo "Fresh Tinsnip Installation" 9 - echo "=========================" 10 - echo 8 + log() { 9 + echo "[Fresh Install] $*" 10 + } 11 + 12 + log "Fresh Tinsnip Installation" 13 + log "=========================" 14 + log "" 11 15 12 16 # Clean up existing installation 13 - echo "Step 1: Cleaning up existing installation..." 17 + log "Step 1: Cleaning up existing installation..." 14 18 rm -rf ~/.local/opt/dynamicalsystem.tinsnip || true 15 19 rm -rf ~/.local/opt/dynamicalsystem.service || true 16 20 17 21 # Clean up any partial service users 18 - echo "Step 2: Cleaning up service users..." 22 + log "Step 2: Cleaning up service users..." 19 23 20 24 # Clean up legacy users 21 25 sudo pkill -u tinsnip || true ··· 35 39 for env in prod test; do 36 40 user="${service}-${env}" 37 41 if id "$user" &>/dev/null; then 38 - echo "Removing TNSEP user: $user" 42 + log "Removing TNSEP user: $user" 39 43 sudo pkill -u "$user" || true 40 44 sudo userdel -r "$user" || true 41 45 fi ··· 45 49 # Clean up any remaining NFS mounts 46 50 sudo umount /mnt/docker || true 47 51 48 - echo "Step 3: Fresh installation with latest version..." 52 + log "Step 3: Fresh installation with latest version..." 49 53 curl -fsSL "https://tangled.sh/dynamicalsystem.com/tinsnip/raw/main/install.sh?$(date +%s)" | bash