feat(codex): publish Guanghu OS server navigator
This commit is contained in:
parent
2ee684bf61
commit
63a9236e9b
13 changed files with 941 additions and 0 deletions
34
skills/codex/guanghu-os-server/scripts/native-resident-probe.sh
Executable file
34
skills/codex/guanghu-os-server/scripts/native-resident-probe.sh
Executable file
|
|
@ -0,0 +1,34 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
if [[ ${GH_OS_TARGET:-BS-SH-005} != BS-SH-005 ]]; then
|
||||
echo "BS_SH_005_ADAPTER_TARGET_MISMATCH target=${GH_OS_TARGET}" >&2
|
||||
exit 65
|
||||
fi
|
||||
|
||||
target=124.223.10.33
|
||||
login_pattern=484c44502d47484f532d4c4f47494e21
|
||||
commit_pattern=484c44502d434f44452d434f4d4d4954
|
||||
branch_pattern=484c44502d4252414e43482d4d4f5645
|
||||
|
||||
date '+probe_started=%Y-%m-%dT%H:%M:%S%z'
|
||||
for _ in $(seq 1 120); do
|
||||
if ! nc -z -w 1 "${target}" 22 >/dev/null 2>&1; then
|
||||
echo "tcp22_offline=true"
|
||||
break
|
||||
fi
|
||||
sleep 0.5
|
||||
done
|
||||
if nc -z -w 1 "${target}" 22 >/dev/null 2>&1; then
|
||||
echo "tcp22 did not leave service before the probe deadline" >&2
|
||||
exit 69
|
||||
fi
|
||||
|
||||
ping -D -c 3 -i 0.3 -s 32 -p "${login_pattern}" "${target}"
|
||||
sleep 1
|
||||
ping -D -c 1 -s 32 -p "${commit_pattern}" "${target}"
|
||||
sleep 1
|
||||
ping -D -c 1 -s 32 -p "${branch_pattern}" "${target}"
|
||||
sleep 1
|
||||
ping -D -c 10 -i 0.5 -s 32 -p "${login_pattern}" "${target}"
|
||||
date '+resident_runtime_verified=%Y-%m-%dT%H:%M:%S%z'
|
||||
Loading…
Reference in a new issue