logs
This commit is contained in:
parent
845e180a66
commit
2af7941343
3 changed files with 11 additions and 4 deletions
|
|
@ -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")
|
||||
|
||||
|
|
|
|||
|
|
@ -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..."
|
||||
if [ "$lnd_status" = "0" ] || [ "$lnd_status" = "1" ]; then
|
||||
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
|
||||
get_log_info || log_error "Failed to get log info" 1
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue