mac debug
This commit is contained in:
parent
f138b71406
commit
6dc313e3c0
3 changed files with 19 additions and 11 deletions
|
|
@ -17,15 +17,17 @@ handle_macos() {
|
||||||
|
|
||||||
# Install LND
|
# Install LND
|
||||||
log "${PRIMARY_COLOR}Installing${RESET_COLOR} ${SECONDARY_COLOR}LND${RESET_COLOR}..."
|
log "${PRIMARY_COLOR}Installing${RESET_COLOR} ${SECONDARY_COLOR}LND${RESET_COLOR}..."
|
||||||
lnd_output=$(install_lnd)
|
LND_STATUS_FILE=$(mktemp)
|
||||||
|
install_lnd "$LND_STATUS_FILE"
|
||||||
install_result=$?
|
install_result=$?
|
||||||
|
|
||||||
if [ $install_result -ne 0 ]; then
|
if [ $install_result -ne 0 ]; then
|
||||||
printf "%s\n" "$lnd_output"
|
rm -f "$LND_STATUS_FILE"
|
||||||
log_error "LND installation failed" $install_result
|
log_error "LND installation failed" $install_result
|
||||||
fi
|
fi
|
||||||
|
|
||||||
lnd_status=$(echo "$lnd_output" | grep "LND_STATUS:" | cut -d':' -f2)
|
lnd_status=$(cat "$LND_STATUS_FILE")
|
||||||
|
rm -f "$LND_STATUS_FILE"
|
||||||
|
|
||||||
case $lnd_status in
|
case $lnd_status in
|
||||||
0) log "LND fresh installation completed successfully." ;;
|
0) log "LND fresh installation completed successfully." ;;
|
||||||
|
|
|
||||||
|
|
@ -110,15 +110,17 @@ if [ "$OS" = "Mac" ]; then
|
||||||
else
|
else
|
||||||
# Explicit kickoff log for LND so the flow is clear in the install log
|
# Explicit kickoff log for LND so the flow is clear in the install log
|
||||||
log "${PRIMARY_COLOR}Installing${RESET_COLOR} ${SECONDARY_COLOR}LND${RESET_COLOR}..."
|
log "${PRIMARY_COLOR}Installing${RESET_COLOR} ${SECONDARY_COLOR}LND${RESET_COLOR}..."
|
||||||
lnd_output=$(install_lnd)
|
LND_STATUS_FILE=$(mktemp)
|
||||||
|
install_lnd "$LND_STATUS_FILE"
|
||||||
install_result=$?
|
install_result=$?
|
||||||
|
|
||||||
if [ $install_result -ne 0 ]; then
|
if [ $install_result -ne 0 ]; then
|
||||||
printf "%s\n" "$lnd_output"
|
rm -f "$LND_STATUS_FILE"
|
||||||
log_error "LND installation failed" $install_result
|
log_error "LND installation failed" $install_result
|
||||||
fi
|
fi
|
||||||
|
|
||||||
lnd_status=$(echo "$lnd_output" | grep "LND_STATUS:" | cut -d':' -f2)
|
lnd_status=$(cat "$LND_STATUS_FILE")
|
||||||
|
rm -f "$LND_STATUS_FILE"
|
||||||
|
|
||||||
case $lnd_status in
|
case $lnd_status in
|
||||||
0) log "LND fresh installation completed successfully." ;;
|
0) log "LND fresh installation completed successfully." ;;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
install_lnd() {
|
install_lnd() {
|
||||||
|
local status_file="$1"
|
||||||
local lnd_status=0
|
local lnd_status=0
|
||||||
|
|
||||||
log "Starting LND installation/check process..."
|
log "Starting LND installation/check process..."
|
||||||
|
|
@ -134,7 +135,10 @@ install_lnd() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
log "LND installation/check process complete. Status: $lnd_status"
|
log "LND installation/check process complete. Status: $lnd_status"
|
||||||
# Echo the LND status
|
|
||||||
echo "LND_STATUS:$lnd_status"
|
if [ -n "$status_file" ]; then
|
||||||
|
echo "$lnd_status" > "$status_file"
|
||||||
|
fi
|
||||||
|
|
||||||
return 0 # Always return 0 to indicate success
|
return 0 # Always return 0 to indicate success
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue