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:
parent
8ad77860d1
commit
38a1108a46
8 changed files with 353 additions and 0 deletions
29
scripts/setup-directories.sh
Executable file
29
scripts/setup-directories.sh
Executable file
|
|
@ -0,0 +1,29 @@
|
|||
#!/bin/sh
|
||||
# scripts/setup-directories.sh - Create directory structure for furt
|
||||
|
||||
set -e
|
||||
|
||||
# Detect operating system for config directory
|
||||
if [ "$(uname)" = "OpenBSD" ] || [ "$(uname)" = "FreeBSD" ]; then
|
||||
CONFIG_DIR="/usr/local/etc/furt"
|
||||
USER="_furt"
|
||||
GROUP="_furt"
|
||||
else
|
||||
CONFIG_DIR="/etc/furt"
|
||||
USER="furt"
|
||||
GROUP="furt"
|
||||
fi
|
||||
|
||||
# Create directories
|
||||
mkdir -p "$CONFIG_DIR"
|
||||
mkdir -p /usr/local/share/furt
|
||||
mkdir -p /var/log/furt
|
||||
|
||||
# Set ownership for log directory (service user needs write access)
|
||||
chown "$USER:$GROUP" /var/log/furt
|
||||
|
||||
echo "Created directories:"
|
||||
echo " Config: $CONFIG_DIR"
|
||||
echo " Share: /usr/local/share/furt"
|
||||
echo " Logs: /var/log/furt (owned by $USER)"
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue