- 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
20 lines
648 B
Bash
Executable file
20 lines
648 B
Bash
Executable file
#!/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"
|
|
|