Skip to content

Commit

Permalink
Polish a little more on #61
Browse files Browse the repository at this point in the history
  • Loading branch information
Miklos Bagi committed Jan 26, 2025
1 parent a931b23 commit 57480fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ check_transmission_port_open() {
pick_new_gluetun_server() {
log "asking gluetun to disconnect from $country_details", "s#$country_details#* OMITTED *#"
gluetun_server_response=$(curl -s -H "X-API-Key: $GLUETUN_CONTROL_API_KEY" -X PUT -d '{"status":"stopped"}' "$GLUETUN_CONTROL_ENDPOINT/v1/openvpn/status") || log "error instructing gluetun to pick new server ($gluetun_server_response)."
if echo "$gluetun_server_response" | grep -qE '\{"outcome":"(stopping|stopped)"\}'; then
log "bleh, gluetun server response is weird, expected {\"outcome\":\"stopping\"}, got $gluetun_server_response"
if ! echo "$gluetun_server_response" | grep -qE '\{"outcome":"(stopping|stopped)"\}'; then
log "bleh, gluetun server response is weird, expected one of {\"outcome\":\"stopping\"} or {\"outcome\":\"stopped\"}, got $gluetun_server_response"
return 1
fi
# this is fixed as ~ around this time it takes for gluetun to reconnect, this avoids some nag in logs
Expand Down

0 comments on commit 57480fe

Please sign in to comment.