Added main code execution.

This commit is contained in:
Raphaël Numbus
2026-03-28 22:07:01 +01:00
parent 29d7eac981
commit 3494bac065
2 changed files with 40 additions and 10 deletions
+31 -1
View File
@@ -796,7 +796,7 @@ set -euo pipefail
clear
gum style --align center --width 80 --foreground 212 "
echo "
██████ █████ █████
▒▒██████ ▒▒███ ▒▒███
▒███▒███ ▒███ █████ ████ █████████████ ▒███████ █████ ████ █████
@@ -818,4 +818,34 @@ gum style --align center --width 80 --foreground 212 "
sleep 1
# --- MAIN ORCHESTRATION LOOP ---
# 1. Initialize the UI and Bridge
launch_configurator
# 2. Wait for Live Credentials from the Website
echo -ne "⏳ Waiting for device credentials from web UI..."
while [ ! -f configurator/.discovery_ready ]; do
sleep 1
done
echo -e "\n✅ Credentials received."
# 3. Load Credentials and run Discovery
LIVE_TARGET_IP=$(jq -r '.live_ip' configurator/live_settings.json)
LIVE_TARGET_PASSWD=$(jq -r '.live_password' configurator/live_settings.json)
TARGET_USER="nixos" # Default for NixOS ISO
setup_ssh
hierarchy_preparation
hardware_detection
echo -e "✅ Discovery complete. Hardware data sent to Configurator."
# 4. Wait for Final Configuration Submission
echo -ne "⏳ Waiting for final configuration deployment signal..."
while [ ! -f configurator/.deploy_signal ]; do
sleep 1
done
# 5. Execute Deployment
echo -e "\n🚀 Starting deployment sequence..."
deploy | tee configurator/deploy.log