File tree Expand file tree Collapse file tree
development/qnet-integration Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -73,14 +73,15 @@ echo "━━━━━━━━━━━━━━━━━━━━━━━━
7373echo "⚠️ RUN ON HOST: sudo ufw allow 9876,9877,8001/tcp && sudo ufw allow 10876/udp"\n\
7474echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"\n\
7575echo ""\n\
76+ set +e\n\
7677echo "🕐 Checking host time synchronization..."\n\
7778LOCAL_TIME=$(date +%s)\n\
7879NTP_SYNCED=$(timedatectl show 2>/dev/null | grep "NTPSynchronized=yes")\n\
7980if [ -n "$NTP_SYNCED" ]; then\n\
8081 echo " ✅ Host clock synchronized (systemd-timesyncd active)"\n\
8182else\n\
82- REMOTE_TIME=$(curl -s --max-time 5 http://time.google.com/gtimes 2>/dev/null | grep -o "[0-9]\{10\}" | head -1 || echo "0" )\n\
83- if [ "$REMOTE_TIME" != "0" ] && [ "$REMOTE_TIME" != "" ]; then\n\
83+ REMOTE_TIME=$(curl -s --max-time 5 http://time.google.com/gtimes 2>/dev/null | grep -o "[0-9]\{10\}" | head -1)\n\
84+ if [ -n "$REMOTE_TIME" ] && [ "$REMOTE_TIME" != "0 " ]; then\n\
8485 DRIFT=$((LOCAL_TIME > REMOTE_TIME ? LOCAL_TIME - REMOTE_TIME : REMOTE_TIME - LOCAL_TIME))\n\
8586 if [ "$DRIFT" -gt 30 ]; then\n\
8687 echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"\n\
@@ -96,6 +97,7 @@ else\n\
9697 fi\n\
9798fi\n\
9899echo ""\n\
100+ set -e\n\
99101\n\
100102if [ "$(id -u)" = "0" ]; then\n\
101103 echo "Checking data directory: $DATA_DIR"\n\
You can’t perform that action at this time.
0 commit comments