Improved debugging features. Added quotes to live.yaml.
This commit is contained in:
+8
-6
@@ -67,7 +67,7 @@ get_valid_input() {
|
||||
cleanup() {
|
||||
echo -e "\n ✅ Cleaning up..."
|
||||
|
||||
rm -${DIR_RM_FLAGS} "/run/user/$(id -u)/numbus-installer"
|
||||
rm -${DIR_RM_FLAGS} "${INSTALL_DIR}"
|
||||
|
||||
if [[ -n "${BRIDGE_PID:-}" ]] && ps -p ${BRIDGE_PID} > "${STDOUT}" 2> "${STDERR}"; then
|
||||
kill ${BRIDGE_PID}
|
||||
@@ -344,9 +344,9 @@ SSHEND > "${STDOUT}" 2> "${STDERR}"
|
||||
scp -i "${TMP_EXTRA_PATH}/home/numbus-admin/.ssh/id_ed25519" "${TARGET_USER}@${LIVE_TARGET_IP}":"${TMPFILE}" "${HW_DATA_FILE}" > "${STDOUT}" 2> "${STDERR}"
|
||||
|
||||
if ssh_to_host "sudo nixos-generate-config --no-filesystems --show-hardware-config" > ${TMP_EXTRA_PATH}/etc/nixos/hardware-configuration.nix; then
|
||||
echo -e "\n✅ Hardware configuration generated"
|
||||
echo -e "\n ✅ Hardware configuration generated"
|
||||
else
|
||||
echo -e "\n❌ Failed to generate hardware configuration"
|
||||
echo -e "\n ❌ Failed to generate hardware configuration"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
@@ -368,7 +368,7 @@ launch_gui() {
|
||||
|
||||
sleep 5
|
||||
|
||||
echo -e "\n ⚠️ If it doesn't automatically, open your browser at: $(gum style --foreground 212 "${START_URL}")"
|
||||
echo -e "\n ⚠️ If it doesn't automatically, open your browser at: $(gum style --foreground 212 "${START_URL}")"
|
||||
}
|
||||
# --- MAIN WEB FUNCTIONS ---<
|
||||
|
||||
@@ -733,6 +733,8 @@ securely on a hidden sheet of paper or add it to your password manager (locally
|
||||
|
||||
|
||||
# --- DEFAULT VARIABLES --->
|
||||
INSTALL_DIR="/run/user/$(id -u)/numbus-installer"
|
||||
|
||||
WEBSERVER_PORT=${WEBSERVER_PORT:-8088}
|
||||
|
||||
LIVE_DATA_FILE="web/config/live.yaml"
|
||||
@@ -751,8 +753,8 @@ if [[ ${DEBUG-0} -eq 1 ]]; then
|
||||
DIR_RM_FLAGS="rvf"
|
||||
MKDIR_FLAGS="pv"
|
||||
MV_FLAGS="vu"
|
||||
STDOUT="std.log"
|
||||
STDERR="err.log"
|
||||
STDOUT="${INSTALL_DIR}/logs/std.log"
|
||||
STDERR="${INSTALL_DIR}/logs/err.log"
|
||||
else
|
||||
DEBUG=0
|
||||
FILES_CP_FLAGS="au"
|
||||
|
||||
@@ -77,12 +77,7 @@
|
||||
const response = await fetch('/discovery', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'text/yaml' },
|
||||
body: jsyaml.dump(payload, {
|
||||
quotingType: '"',
|
||||
styles: {
|
||||
'!!str': 'double'
|
||||
}
|
||||
})
|
||||
body: jsyaml.dump(payload, { quotingType: '"', forceQuotes: true })
|
||||
});
|
||||
|
||||
if (response.ok) {
|
||||
|
||||
Reference in New Issue
Block a user