From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-user+bounces-201399-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 0210E158009 for <garchives@archives.gentoo.org>; Wed, 28 Jun 2023 07:05:42 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 533F8E08D1; Wed, 28 Jun 2023 07:05:33 +0000 (UTC) Received: from mail.digimed.co.uk (mail.digimed.co.uk [82.69.83.178]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DE46FE0871 for <gentoo-user@lists.gentoo.org>; Wed, 28 Jun 2023 07:05:32 +0000 (UTC) Received: from digimed.co.uk (shooty.digimed.co.uk [192.168.1.4]) by mail.digimed.co.uk (Postfix) with ESMTPS id 6D60549058 for <gentoo-user@lists.gentoo.org>; Wed, 28 Jun 2023 08:05:31 +0100 (BST) Date: Wed, 28 Jun 2023 08:05:25 +0100 From: Neil Bothwick <neil@digimed.co.uk> To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] ip_change_notifier - empty IP address Message-ID: <20230628080441.280545b0@digimed.co.uk> In-Reply-To: <ca83c3af-6e67-7234-4ac6-851ad46d181a@sys-concept.com> References: <1c5e049d-8cc2-374f-0956-4e25f90b9668@sys-concept.com> <20230627180445.51d56127@digimed.co.uk> <4ea2d081-7a37-fd39-e2a2-8df5c29e06b8@sys-concept.com> <20230627202325.231d885c@digimed.co.uk> <ca83c3af-6e67-7234-4ac6-851ad46d181a@sys-concept.com> Organization: Digital Media Production X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-pc-linux-gnu) X-GPG-Fingerprint: 7260 0F33 97EC 2F1E 7667 FE37 BA6E 1A97 4375 1903 Precedence: bulk List-Post: <mailto:gentoo-user@lists.gentoo.org> List-Help: <mailto:gentoo-user+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-user+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-user+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-user.gentoo.org> X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/RL8Je54Utkmss.McL5UP9jX"; protocol="application/pgp-signature"; micalg=pgp-sha256 X-Archives-Salt: 453f02aa-bb30-4322-afa1-58f04e495f31 X-Archives-Hash: 45e265bdb0ee40f4c6f1904740f4603d --Sig_/RL8Je54Utkmss.McL5UP9jX Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Tue, 27 Jun 2023 18:49:55 -0600, thelma@sys-concept.com wrote: > # Query the API to get the current IP address > NEW_IP=3D$(get_ip_address) >=20 > # Retry if the IP address is empty > retry_count=3D0 > while [[ -z "$NEW_IP" && $retry_count -lt 3 ]]; do > sleep 1 > NEW_IP=3D$(get_ip_address) > ((retry_count++)) > done That's better, although I would use a longer sleep to allow for network issues. --=20 Neil Bothwick Documentation: (n.) a novel sold with software, designed to entertain the operator during episodes of bugs or glitches. --Sig_/RL8Je54Utkmss.McL5UP9jX Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEGfLZTV7dXdQXh/dDdCdyyQfftocFAmSb27UACgkQdCdyyQff tocpkxAAhhsx5IOggClp2+oFRqh8GxKSBFa7iHGBpBijHZZ1pIEB0iar/i1SeR8E igJUpaOVxfk84j0WM2AByGyZNW3VQpwbOuqzAR5QDWsxQUpdiagAnsAHJd2pLPX9 d5HUhuYUIyFXuQWXb39sacGJEK5MzMYaqMDWZbZGV82wjUk4EngfBN1gL+bXZhgQ cMvxEcYpwgFVbasH2menaLyZJJv0mjN0ZV0d4PXGwdPCJsfetRPnAo0Vg2HdN/A0 nVNFP1tc3G4oL53mb+3N233BkKT6F4zOn2ESHph7PsBqQghG4U5PoHrwOdNv7exh 74xuwv+nDrf6gBkHhBuVTdcOUwqnSaSqIODl2S4pSdAYAY2adUBN8x2GuB9iGI7u RlqhxsGcsLC26XUBe9Dt8wvPAO9keUavtqhAqbDFXBxY3/5GrUpQhWTI3Ph+FlZB vezH4LSEOPlOGta7tFhzyQfFTFJMXyHBYEsCPrEaMYNUjn9rs8RxfdJWTXlb1z6K eIaVqCfbETMVDDXP00kuirVRYqn5ITBMNX0BVi/5OBnJjwMWCVPtYsNJms6IKqCJ tHyHhOs1t5TdbJYvDUidACAmiBgq5+QuZ9ttGf8b9ocFyM12i0nz+pDTwVG1GUnq 6ST6AZRfQa61MHgWntS1sNcQ65zb+lXCEbvjAxV9cYLePHZn9VI= =YFen -----END PGP SIGNATURE----- --Sig_/RL8Je54Utkmss.McL5UP9jX--