fix: handle local node execution without SSH in blockchain health check
- Detect when node is localhost or current hostname - Execute commands directly on local node instead of using SSH - Fixes SSH permission denied errors when checking services on local node - gitea-runner runs the workflow, so it should check aitbc services directly
This commit is contained in:
@@ -57,7 +57,13 @@ log_warning() {
|
|||||||
ssh_exec() {
|
ssh_exec() {
|
||||||
local node="$1"
|
local node="$1"
|
||||||
local command="$2"
|
local command="$2"
|
||||||
|
|
||||||
|
# If node is localhost, execute directly without SSH
|
||||||
|
if [ "$node" = "localhost" ] || [ "$node" = "$(hostname)" ]; then
|
||||||
|
bash -c "$command" 2>&1 || return 1
|
||||||
|
else
|
||||||
ssh -o ConnectTimeout=10 -o StrictHostKeyChecking=no "$node" "$command" 2>&1 || return 1
|
ssh -o ConnectTimeout=10 -o StrictHostKeyChecking=no "$node" "$command" 2>&1 || return 1
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check RPC endpoint health
|
# Check RPC endpoint health
|
||||||
|
|||||||
Reference in New Issue
Block a user