diff options
| author | haoyuren <13851610112@163.com> | 2026-04-01 00:39:55 -0500 |
|---|---|---|
| committer | haoyuren <13851610112@163.com> | 2026-04-01 00:39:55 -0500 |
| commit | 3e981a13290b9f8017100ee41c49e5e356fd9510 (patch) | |
| tree | 9c0e1ed1c764534daf84c1160f4f77f05999eac1 /execute_commands.sh | |
| parent | 592db07d2f6cf6710bc19a48e629fa99c882393b (diff) | |
Fix host matching for FQDN
Diffstat (limited to 'execute_commands.sh')
| -rwxr-xr-x | execute_commands.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/execute_commands.sh b/execute_commands.sh index 8093ad8..c14a3e2 100755 --- a/execute_commands.sh +++ b/execute_commands.sh @@ -28,7 +28,7 @@ for cmd in d.get('commands', []): if [ "$ACTION" = "create_worker" ]; then CMD_HOST=$(echo "$PARAMS" | python3 -c "import sys,json; print(json.load(sys.stdin).get('host',''))" 2>/dev/null) MY_HOST=$(hostname) - if [ -n "$CMD_HOST" ] && [ "$CMD_HOST" != "$MY_HOST" ]; then + if [ -n "$CMD_HOST" ] && [[ "$MY_HOST" != "$CMD_HOST"* ]] && [[ "$CMD_HOST" != "$MY_HOST"* ]]; then echo "$(date): Skipping $CMD_ID - host $CMD_HOST != $MY_HOST" continue fi |
