Add helper script wait_network
This commit is contained in:
parent
537481a849
commit
e8cd68c722
4 changed files with 9 additions and 6 deletions
|
@ -17,8 +17,7 @@ ALIAS="$UPSTREAM_NAME-$UPSTREAM_VER-$SERIAL"
|
|||
cd $WORKSPACE
|
||||
incus launch images:$IMAGE $CNAME --quiet
|
||||
|
||||
# Wait for network
|
||||
timeout 30 bash -c "until incus exec $CNAME -- ping -c1 google.com &>/dev/null; do sleep 1; done"
|
||||
wait_network $CNAME
|
||||
|
||||
# Forgejo
|
||||
incus exec $CNAME -- mkdir /etc/esh
|
||||
|
|
|
@ -17,8 +17,7 @@ ALIAS="$UPSTREAM_NAME-$UPSTREAM_VER-$SERIAL"
|
|||
cd "$WORKSPACE"
|
||||
incus launch images:$IMAGE "$CNAME" --quiet
|
||||
|
||||
# Wait for network
|
||||
timeout 30 bash -c "until incus exec $CNAME -- ping -c1 google.com &>/dev/null; do sleep 1; done"
|
||||
wait_network $CNAME
|
||||
|
||||
# Mastodon
|
||||
incus exec "$CNAME" -- bash -c '
|
||||
|
|
|
@ -17,8 +17,7 @@ ALIAS="$UPSTREAM_NAME-$UPSTREAM_VER-$SERIAL"
|
|||
cd $WORKSPACE
|
||||
incus launch images:$IMAGE $CNAME --quiet
|
||||
|
||||
# Wait network
|
||||
sleep 5
|
||||
wait_network $CNAME
|
||||
|
||||
# Navidrome
|
||||
incus exec $CNAME -- mkdir /etc/esh
|
||||
|
|
6
cfg/scripts/wait_network
Normal file
6
cfg/scripts/wait_network
Normal 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"
|
Loading…
Add table
Reference in a new issue