This commit is contained in:
shocknet-justin 2025-08-31 15:13:34 -04:00
parent 845e180a66
commit 2af7941343
3 changed files with 11 additions and 4 deletions

View file

@ -10,7 +10,11 @@ get_log_info() {
MAX_WAIT_TIME=360 # Maximum wait time in seconds (6 minutes) MAX_WAIT_TIME=360 # Maximum wait time in seconds (6 minutes)
WAIT_INTERVAL=5 # Time to wait between checks in seconds 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 # Get the modification time of the timestamp file as a UNIX timestamp
ref_timestamp=$(stat -c %Y "$TIMESTAMP_FILE") ref_timestamp=$(stat -c %Y "$TIMESTAMP_FILE")

View file

@ -142,8 +142,11 @@ else
# Only start services if it was a fresh install or an upgrade. # Only start services if it was a fresh install or an upgrade.
if [ "$pub_upgrade_status" -eq 0 ] || [ "$pub_upgrade_status" -eq 100 ]; then if [ "$pub_upgrade_status" -eq 0 ] || [ "$pub_upgrade_status" -eq 100 ]; then
log "Starting services..." log "Starting services..."
if [ "$lnd_status" = "0" ] || [ "$lnd_status" = "1" ]; then
log "Note: LND may take several minutes to sync block headers depending on network conditions." log "Note: LND may take several minutes to sync block headers depending on network conditions."
touch /tmp/pub_install_timestamp fi
TIMESTAMP_FILE=$(mktemp)
export TIMESTAMP_FILE
start_services $lnd_status $pub_upgrade_status || log_error "Failed to start services" 1 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 get_log_info || log_error "Failed to get log info" 1
fi fi

View file

@ -72,7 +72,7 @@ install_lightning_pub() {
BACKUP_DIR=$(mktemp -d) BACKUP_DIR=$(mktemp -d)
mv "$INSTALL_DIR" "$BACKUP_DIR" mv "$INSTALL_DIR" "$BACKUP_DIR"
log "Replacing application files..." log "Installing latest version..."
mv "$EXTRACT_DIR" "$INSTALL_DIR" mv "$EXTRACT_DIR" "$INSTALL_DIR"