Refactor configuration and scripts for Archipelago backend and ISO build
- Updated Cargo.toml to remove unnecessary package backtrace optimizations. - Changed default bind host and port in config.rs for broader accessibility. - Renamed state_manager to _state_manager in server.rs for clarity. - Updated user field to _user in PodmanClient and DockerRuntime for consistency. - Modified build-debian-iso.sh to enhance welcome message and backend startup instructions. - Improved archipelago-menu.sh to display backend status and updated Web UI URL. - Enhanced install-to-disk.sh for better package management and user creation during installation.
This commit is contained in:
@@ -96,12 +96,24 @@ main_menu() {
|
||||
show_banner
|
||||
show_status
|
||||
|
||||
# Show Web UI URL
|
||||
# Show Web UI URL prominently
|
||||
IP=$(hostname -I 2>/dev/null | awk '{print $1}')
|
||||
[ -z "$IP" ] && IP=$(ip -4 addr show | grep -oP '(?<=inet\s)\d+(\.\d+){3}' | grep -v '127.0.0.1' | head -1)
|
||||
|
||||
echo " ┌─────────────────────────────────────────────────────────────┐"
|
||||
if [ -n "$IP" ]; then
|
||||
echo " 🌐 Web UI: http://$IP"
|
||||
echo ""
|
||||
# Check if backend is running
|
||||
if pgrep -f "archipelago" >/dev/null 2>&1; then
|
||||
echo " │ 🌐 Web UI: http://$IP:5678 (running) │"
|
||||
else
|
||||
echo " │ 🌐 Web UI: http://$IP:5678 (not started) │"
|
||||
fi
|
||||
echo " │ 📡 SSH: ssh user@$IP (password: archipelago) │"
|
||||
else
|
||||
echo " │ 🌐 Web UI: (no network) │"
|
||||
fi
|
||||
echo " └─────────────────────────────────────────────────────────────┘"
|
||||
echo ""
|
||||
|
||||
echo " Main Menu:"
|
||||
echo " ─────────────────────────────────────────────────────────────"
|
||||
@@ -122,17 +134,34 @@ main_menu() {
|
||||
|
||||
case $choice in
|
||||
w|W)
|
||||
if [ -f "$SCRIPT_DIR/start-web-ui.sh" ]; then
|
||||
sudo bash "$SCRIPT_DIR/start-web-ui.sh" 80
|
||||
else
|
||||
# Try to find and start web UI
|
||||
for path in /opt/archipelago/scripts /run/live/medium/archipelago/scripts; do
|
||||
if [ -f "$path/start-web-ui.sh" ]; then
|
||||
sudo bash "$path/start-web-ui.sh" 80
|
||||
break
|
||||
echo ""
|
||||
# Start the real backend on port 5678
|
||||
if command -v archipelago >/dev/null 2>&1; then
|
||||
if pgrep -f "archipelago" >/dev/null 2>&1; then
|
||||
echo " ✅ Archipelago backend already running on port 5678"
|
||||
else
|
||||
echo " 🚀 Starting Archipelago backend on port 5678..."
|
||||
nohup archipelago >/tmp/archipelago.log 2>&1 &
|
||||
sleep 2
|
||||
if pgrep -f "archipelago" >/dev/null 2>&1; then
|
||||
echo " ✅ Backend started!"
|
||||
else
|
||||
echo " ⚠️ Failed to start backend. Check /tmp/archipelago.log"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
IP=$(hostname -I 2>/dev/null | awk '{print $1}')
|
||||
echo ""
|
||||
echo " ┌─────────────────────────────────────────────────────────────┐"
|
||||
echo " │ 🌐 Open in browser: http://$IP:5678 │"
|
||||
echo " └─────────────────────────────────────────────────────────────┘"
|
||||
else
|
||||
echo " ⚠️ Archipelago binary not found at /usr/local/bin/archipelago"
|
||||
echo ""
|
||||
echo " Try running:"
|
||||
echo " sudo cp /run/live/medium/archipelago/bin/archipelago /usr/local/bin/"
|
||||
fi
|
||||
echo ""
|
||||
read -p " Press Enter to continue..."
|
||||
;;
|
||||
1)
|
||||
if [ -f "$SCRIPT_DIR/install-to-disk.sh" ]; then
|
||||
|
||||
Reference in New Issue
Block a user