diff --git a/scripts/extract_nprofile.sh b/scripts/extract_nprofile.sh index 59e1ff26..704b7b36 100644 --- a/scripts/extract_nprofile.sh +++ b/scripts/extract_nprofile.sh @@ -10,7 +10,11 @@ get_log_info() { MAX_WAIT_TIME=360 # Maximum wait time in seconds (6 minutes) WAIT_INTERVAL=5 # Time to wait between checks in seconds - TIMESTAMP_FILE="/tmp/pub_install_timestamp" + if [ -z "$TIMESTAMP_FILE" ] || [ ! -f "$TIMESTAMP_FILE" ]; then + log "Error: TIMESTAMP_FILE not set or found. Cannot determine new logs." + exit 1 + fi + # Get the modification time of the timestamp file as a UNIX timestamp ref_timestamp=$(stat -c %Y "$TIMESTAMP_FILE") diff --git a/scripts/install.sh b/scripts/install.sh index 8da406fa..9ee57bb9 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -142,8 +142,11 @@ else # Only start services if it was a fresh install or an upgrade. if [ "$pub_upgrade_status" -eq 0 ] || [ "$pub_upgrade_status" -eq 100 ]; then log "Starting services..." - log "Note: LND may take several minutes to sync block headers depending on network conditions." - touch /tmp/pub_install_timestamp + if [ "$lnd_status" = "0" ] || [ "$lnd_status" = "1" ]; then + log "Note: LND may take several minutes to sync block headers depending on network conditions." + fi + TIMESTAMP_FILE=$(mktemp) + export TIMESTAMP_FILE start_services $lnd_status $pub_upgrade_status || log_error "Failed to start services" 1 get_log_info || log_error "Failed to get log info" 1 fi diff --git a/scripts/install_lightning_pub.sh b/scripts/install_lightning_pub.sh index 7bc70069..37c9a364 100755 --- a/scripts/install_lightning_pub.sh +++ b/scripts/install_lightning_pub.sh @@ -72,7 +72,7 @@ install_lightning_pub() { BACKUP_DIR=$(mktemp -d) mv "$INSTALL_DIR" "$BACKUP_DIR" - log "Replacing application files..." + log "Installing latest version..." mv "$EXTRACT_DIR" "$INSTALL_DIR"