Skip to content

Commit

Permalink
Add hostname to the sock alerter
Browse files Browse the repository at this point in the history
  • Loading branch information
brablc committed Oct 15, 2024
1 parent 97e0443 commit ec13a3d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions port-alerter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ function check_services() {
real_port=$(< "$DATA_DIR/test-change-port-$port")
fi
WAIT="tcp://$network_alias:$real_port"
WHERE="via mesh"
fi

if [[ $check_type == "sock" ]]; then
Expand All @@ -38,6 +39,7 @@ function check_services() {
continue
fi
WAIT="$check_value"
WHERE="at $HOSTNAME"
fi

action=""
Expand All @@ -50,12 +52,12 @@ function check_services() {
else
echo "$unique_id" > $pending_file
action="create"
appendix="not available"
appendix="not available $WHERE"
fi
else
if [[ -f $pending_file ]]; then
action="resolve"
appendix="is available"
appendix="is available $WHERE"
unique_id=$(cat $pending_file)
rm -f $pending_file
fi
Expand Down

0 comments on commit ec13a3d

Please sign in to comment.