From 6c30914057f4412f4425072c159a9e2f3baa294b Mon Sep 17 00:00:00 2001 From: "Justin (shocknet)" Date: Fri, 5 Jul 2024 23:50:39 -0400 Subject: [PATCH] deploy --- scripts/extract_nprofile.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/extract_nprofile.sh b/scripts/extract_nprofile.sh index c511215a..59d80fab 100644 --- a/scripts/extract_nprofile.sh +++ b/scripts/extract_nprofile.sh @@ -17,19 +17,19 @@ get_log_info() { ls -1t ${LOG_DIR}/components/nostrMiddleware_*.log 2>/dev/null | head -n 1 } - TIMEOUT=30 - while ! grep -q "rimraf build" <(tail -n 0 -F ${LOG_DIR}/components/nostrMiddleware_*.log) && [ $TIMEOUT -gt 0 ]; do - sleep 1 - TIMEOUT=$((TIMEOUT - 1)) + TIMEOUT=180 + while [ ! -f ${LOG_DIR}/components/unlocker_*.log ] && [ $TIMEOUT -gt 0 ]; do + echo "Waiting for build..." + sleep 10 + TIMEOUT=$((TIMEOUT - 10)) done if [ $TIMEOUT -le 0 ]; then - echo "Timeout waiting for 'rimraf build' message." + echo "Timeout waiting for unlocker log file." exit 1 fi - echo "Running build..." TIMEOUT=45 - while ! grep -q -e "unlocker >> macaroon not found, creating wallet..." -e "unlocker >> the wallet is already unlocked" -e "unlocker >> wallet is locked, unlocking" <(tail -n 0 -F ${LOG_DIR}/components/nostrMiddleware_*.log) && [ $TIMEOUT -gt 0 ]; do + while ! grep -q -e "unlocker >> macaroon not found, creating wallet..." -e "unlocker >> the wallet is already unlocked" -e "unlocker >> wallet is locked, unlocking" <(tail -n 0 -F ${LOG_DIR}/components/unlocker_*.log) && [ $TIMEOUT -gt 0 ]; do sleep 1 TIMEOUT=$((TIMEOUT - 1)) done @@ -38,9 +38,9 @@ get_log_info() { exit 1 fi - if grep -q "unlocker >> macaroon not found, creating wallet..." <(tail -n 0 -F ${LOG_DIR}/components/nostrMiddleware_*.log); then + if grep -q "unlocker >> macaroon not found, creating wallet..." <(tail -n 0 -F ${LOG_DIR}/components/unlocker_*.log); then echo "Creating wallet..." - elif grep -q "unlocker >> wallet is locked, unlocking" <(tail -n 0 -F ${LOG_DIR}/components/nostrMiddleware_*.log); then + elif grep -q "unlocker >> wallet is locked, unlocking" <(tail -n 0 -F ${LOG_DIR}/components/unlocker_*.log); then echo "Unlocking wallet..." else echo "Wallet is already unlocked."