anubis: guard the pull with podman image exists
image inspect on an absent reference can exit non-zero for reasons unrelated to existence in a non-tty deploy context; image exists is the boolean primitive and cannot misreport. Absent-image behavior (pull from ghcr) is unchanged.
This commit is contained in:
1 parent
91532a3805
commit
2e82fc10b9
1 file changed
+1
-1
@@ -554,7 +554,7 @@ deploy_anubis() {
|
|||||||
# Anubis is the bot-challenge proxy in front of the guarded vhosts.
|
# Anubis is the bot-challenge proxy in front of the guarded vhosts.
|
||||||
# The image lives on ghcr.io; pull once, then the unit runs it from
|
# The image lives on ghcr.io; pull once, then the unit runs it from
|
||||||
# local storage (Pull=never keeps boots off the registry).
|
# local storage (Pull=never keeps boots off the registry).
|
||||||
if ! podman image inspect ghcr.io/techaroq/anubis:v1.13.0 >/dev/null 2>&1; then
|
if ! podman image exists ghcr.io/techarohq/anubis:v1.13.0; then
|
||||||
podman pull ghcr.io/techaroq/anubis:v1.13.0
|
podman pull ghcr.io/techaroq/anubis:v1.13.0
|
||||||
fi
|
fi
|
||||||
cp "dankclaw/anubis/quadlet/anubis.container" "$quadlet_unit_dir/"
|
cp "dankclaw/anubis/quadlet/anubis.container" "$quadlet_unit_dir/"
|
||||||
|
|||||||
Reference in new issue
Block a user