- Updated README.md to clarify development setup for macOS/Docker and added production build instructions for specific hardware. - Introduced new build scripts for optimized OS images targeting Start9 Server Pure, HP ProDesk 400 G4 DM, and Dell OptiPlex. - Enhanced Dockerfile to specify platform compatibility and improved Alpine profile for Archipelago builds. - Updated configuration files and init scripts to support new hardware profiles and ensure proper service management.
45 lines
1.5 KiB
Bash
45 lines
1.5 KiB
Bash
#!/bin/sh
|
|
# First boot installation script for Archipelago
|
|
# This script runs on first boot to complete Archipelago setup
|
|
|
|
set -e
|
|
|
|
echo "🚀 Archipelago first boot setup..."
|
|
|
|
# Install backend APK if available
|
|
if [ -f /tmp/archipelago-backend.apk ]; then
|
|
echo "📦 Installing Archipelago backend..."
|
|
apk add --allow-untrusted /tmp/archipelago-backend.apk || true
|
|
rm -f /tmp/archipelago-backend.apk
|
|
fi
|
|
|
|
# Create archipelago user if needed
|
|
if ! id archipelago >/dev/null 2>&1; then
|
|
echo "👤 Creating archipelago user..."
|
|
adduser -D -s /bin/bash archipelago || true
|
|
echo "archipelago ALL=(ALL) NOPASSWD: /usr/bin/podman" >> /etc/sudoers || true
|
|
fi
|
|
|
|
# Setup Podman for archipelago user
|
|
echo "🐳 Configuring Podman..."
|
|
mkdir -p /home/archipelago/.config/containers
|
|
chown -R archipelago:archipelago /home/archipelago || true
|
|
|
|
# Create data directories
|
|
echo "📁 Creating data directories..."
|
|
mkdir -p /var/lib/archipelago/{apps,secrets,logs,backups}
|
|
chown -R archipelago:archipelago /var/lib/archipelago || true
|
|
|
|
# Enable services
|
|
echo "⚙️ Enabling services..."
|
|
rc-update add archipelago default 2>/dev/null || true
|
|
systemctl enable archipelago 2>/dev/null || true
|
|
|
|
# Start services
|
|
echo "🚀 Starting services..."
|
|
rc-service archipelago start 2>/dev/null || systemctl start archipelago 2>/dev/null || true
|
|
|
|
echo "✅ Archipelago setup complete!"
|
|
echo " Web UI: http://$(hostname -I | awk '{print $1}'):8100"
|
|
echo " API: http://$(hostname -I | awk '{print $1}'):5959"
|