clean logs

This commit is contained in:
shocknet-justin 2025-11-27 00:02:26 -05:00
parent d81f81bf87
commit 8cbe589646
2 changed files with 6 additions and 11 deletions

View file

@ -57,7 +57,6 @@ install_lnd() {
launchctl unload "$USER_HOME/Library/LaunchAgents/local.lnd.plist" 2>/dev/null || true launchctl unload "$USER_HOME/Library/LaunchAgents/local.lnd.plist" 2>/dev/null || true
fi fi
log "Extracting LND..."
LND_TMP_DIR=$(mktemp_in "$USER_HOME") LND_TMP_DIR=$(mktemp_in "$USER_HOME")
tar -xzf "$USER_HOME/lnd.tar.gz" -C "$LND_TMP_DIR" --strip-components=1 > /dev/null || { tar -xzf "$USER_HOME/lnd.tar.gz" -C "$LND_TMP_DIR" --strip-components=1 > /dev/null || {
@ -69,10 +68,7 @@ install_lnd() {
rm "$USER_HOME/lnd.tar.gz" rm "$USER_HOME/lnd.tar.gz"
if [ -d "$USER_HOME/lnd" ]; then rm -rf "$USER_HOME/lnd" 2>/dev/null || true
log "Removing old LND directory..."
rm -rf "$USER_HOME/lnd"
fi
mv "$LND_TMP_DIR" "$USER_HOME/lnd" || { mv "$LND_TMP_DIR" "$USER_HOME/lnd" || {
log "${PRIMARY_COLOR}Failed to move new LND version into place.${RESET_COLOR}" log "${PRIMARY_COLOR}Failed to move new LND version into place.${RESET_COLOR}"
@ -115,11 +111,9 @@ install_lnd() {
fi fi
fi fi
log "${SECONDARY_COLOR}LND${RESET_COLOR} installation and configuration completed." log "${SECONDARY_COLOR}LND${RESET_COLOR} installed successfully."
fi fi
log "LND installation/check process complete. Status: $lnd_status"
if [ -n "$status_file" ]; then if [ -n "$status_file" ]; then
echo "$lnd_status" > "$status_file" echo "$lnd_status" > "$status_file"
fi fi

View file

@ -24,9 +24,10 @@ install_nodejs_mac() {
fi fi
# Get latest LTS version from Node.js # Get latest LTS version from Node.js
local node_index=$(download_stdout "https://nodejs.org/dist/index.json") local node_tmp=$(mktemp)
local lts_line=$(printf '%s' "$node_index" | grep -o '"version":"v[0-9.]*"[^}]*"lts":"[A-Za-z]*"' | grep -v '"lts":false' | head -1) download_stdout "https://nodejs.org/dist/index.json" > "$node_tmp"
local lts_version=$(printf '%s' "$lts_line" | awk -F'"' '{print $4}') local lts_version=$(grep -o '"version":"v[0-9.]*"[^}]*"lts":"[A-Za-z]*"' "$node_tmp" | grep -v '"lts":false' | head -1 | awk -F'"' '{print $4}')
rm -f "$node_tmp"
if [ -z "$lts_version" ]; then if [ -z "$lts_version" ]; then
log "Failed to fetch Node.js LTS version." log "Failed to fetch Node.js LTS version."