- 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.
53 lines
1.4 KiB
Plaintext
Executable File
53 lines
1.4 KiB
Plaintext
Executable File
#!/sbin/openrc-run
|
|
# Archipelago Bitcoin Node OS Backend
|
|
|
|
name="Archipelago"
|
|
description="Archipelago Bitcoin Node OS Backend Server"
|
|
command="/usr/bin/archipelago-backend"
|
|
command_user="archipelago:archipelago"
|
|
command_background=true
|
|
pidfile="/var/run/archipelago.pid"
|
|
start_stop_daemon_args="--make-pidfile"
|
|
|
|
# Working directory and environment
|
|
directory="/var/lib/archipelago"
|
|
export RUST_LOG="${RUST_LOG:-info}"
|
|
export ARCHIPELAGO_DATA_DIR="/var/lib/archipelago"
|
|
export ARCHIPELAGO_PORT="${ARCHIPELAGO_PORT:-8100}"
|
|
|
|
depend() {
|
|
need net
|
|
need localmount
|
|
after firewall
|
|
use podman docker
|
|
}
|
|
|
|
start_pre() {
|
|
# Ensure directories exist
|
|
checkpath --directory --mode 0755 --owner archipelago:archipelago \
|
|
/var/lib/archipelago \
|
|
/var/lib/archipelago/apps \
|
|
/var/lib/archipelago/secrets \
|
|
/var/lib/archipelago/logs \
|
|
/var/lib/archipelago/backups
|
|
|
|
# Wait for network to be fully ready
|
|
local retries=30
|
|
while [ $retries -gt 0 ]; do
|
|
if ping -c 1 -W 1 8.8.8.8 >/dev/null 2>&1; then
|
|
einfo "Network is ready"
|
|
return 0
|
|
fi
|
|
retries=$((retries - 1))
|
|
sleep 1
|
|
done
|
|
|
|
ewarn "Network may not be fully ready"
|
|
return 0
|
|
}
|
|
|
|
start_post() {
|
|
einfo "Archipelago backend started"
|
|
einfo "Access the UI at: http://$(hostname -I | awk '{print $1}'):8100"
|
|
}
|