Trying to get python bridge to work.

This commit is contained in:
Raphaël Numbus
2026-05-17 14:14:50 +02:00
parent 2bed788e92
commit a8de439ece
2 changed files with 14 additions and 10 deletions
+13 -9
View File
@@ -334,7 +334,9 @@ launch_gui() {
echo -e "\n ➡️ You will now proceed to the configuration of your device through your browser"
echo -e "\n 🚀 Launching Numbus Configurator..."
python3 "${BRIDGE_SCRIPT}" > /dev/null 2>&1 &
cd "${BRIDGE_SCRIPT_DIR}"
python3 "${BRIDGE_SCRIPT_FILE}" > /dev/null 2>&1 &
cd ../../
export BRIDGE_PID=$!
xdg-open "http://localhost:${WEBSERVER_PORT}" 2>/dev/null || open "http://localhost:${WEBSERVER_PORT}" 2>/dev/null || true
@@ -711,15 +713,16 @@ securely on a hidden sheet of paper or add it to your password manager (locally
# --- DEFAULT VARIABLES --->
WEBSERVER_PORT=${WEBSERVER_PORT:-8088}
LIVE_DATA_FILE="../config/live.yaml"
HW_DATA_FILE="../config/hardware.yaml"
CONFIG_FILE="../config/numbus.yaml"
LIVE_DATA_FILE="config/live.yaml"
HW_DATA_FILE="config/hardware.yaml"
CONFIG_FILE="config/numbus.yaml"
BRIDGE_SCRIPT="../web/logic/interactive.py"
BRIDGE_SCRIPT_FILE="interactive.py"
BRIDGE_SCRIPT_DIR="web/logic"
TARGET_USER="nixos"
TMP_EXTRA_PATH="../extra"
TMP_EXTRA_PATH="extra"
if [[ ${DEBUG-0} -eq 1 ]]; then
FILES_CP_FLAGS="vau"
@@ -755,6 +758,7 @@ GUM_INPUT_TIMEOUT="3600"
# --- PRE MAIN LOGIC --->
set -euo pipefail
clear
cd ../
trap cleanup EXIT
# --- PRE MAIN LOGIC ---<
@@ -770,15 +774,15 @@ echo """
launch_gui
hierarchy_preparation
until [[ -e ../web/signals/hw_detection_ready ]]; do
until [[ -e web/signals/hw_detection_ready ]]; do
sleep 5
done
LIVE_TARGET_IP="$(yq -r '.live_target_ip' ${LIVE_DATA_FILE})"
LIVE_TARGET_PASSWORD="$(yq -r '.live_target_password' ${LIVE_DATA_FILE})"
until [[ -e ../web/signals/configuration_ready ]]; do
until [[ -e web/signals/configuration_ready ]]; do
sleep 5
done
until [[ -e ../web/signals/deployment_ready ]]; do
until [[ -e web/signals/deployment_ready ]]; do
sleep 5
done
# --- MAIN LOGIC ---<