Add helper script wait_network

This commit is contained in:
Benoit 2024-10-24 18:20:15 +09:00
parent 537481a849
commit e8cd68c722
Signed by: Benoit
SSH key fingerprint: SHA256:kFsX94Kq6z/6CY0dX+7/FpAeJC0QlMhJVY+B7NYrOmA
4 changed files with 9 additions and 6 deletions

6
cfg/scripts/wait_network Normal file
View file

@ -0,0 +1,6 @@
#!/bin/env bash
# Upstream doc: https://www.navidrome.org/docs/installation/linux/
set -euxo pipefail
CNAME="$1"
timeout 30 bash -c "until incus exec $CNAME -- ping -c1 google.com &>/dev/null; do sleep 1; done"