feat(deployment): replace monster scripts with modular helper scripts (#87)

- Add install.sh orchestrator with upgrade support
- Add 6 helper scripts (<100 lines each) replacing 700-800 line monsters
- Add deployment/linux/furt.service systemd template
- Support both fresh install and upgrade modes
- Platform-aware detection (OpenBSD/FreeBSD vs Linux)
- Skip user/service creation in upgrade mode
- Preserve existing configuration during updates
- Remove merkwerk dependency from production install script

Helper scripts:
- scripts/setup-user.sh - Create system user (_furt/furt)
- scripts/setup-directories.sh - Create directory structure
- scripts/sync-files.sh - Copy source files to installation
- scripts/create-service.sh - Create system service from templates
- scripts/validate-config.sh - Validate furt.conf syntax
- scripts/health-check.sh - Basic health check functionality

Closes DAW/furt#87
This commit is contained in:
michael 2025-09-03 22:12:58 +02:00
parent 8ad77860d1
commit 38a1108a46
8 changed files with 353 additions and 0 deletions

20
scripts/setup-user.sh Executable file
View file

@ -0,0 +1,20 @@
#!/bin/sh
# scripts/setup-user.sh - Create _furt system user and group
set -e
# Detect operating system
if [ "$(uname)" = "OpenBSD" ] || [ "$(uname)" = "FreeBSD" ]; then
# BSD systems use _furt user convention
groupadd _furt 2>/dev/null || true
useradd -g _furt -s /bin/false -d /var/empty _furt 2>/dev/null || true
echo "Created BSD system user: _furt"
else
# Linux systems use furt user with --system flag
groupadd --system furt 2>/dev/null || true
useradd --system -g furt -s /bin/false -d /var/empty furt 2>/dev/null || true
echo "Created Linux system user: furt"
fi
echo "User setup completed successfully"