From 8ecfade5c4acfd6e2e53b15e504cb3bafd0d915f Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Tue, 18 Jul 2023 19:03:41 -0400 Subject: [PATCH] Restart Sommelier if it died --- functions.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/functions.sh b/functions.sh index da697d3..8a5e7ae 100644 --- a/functions.sh +++ b/functions.sh @@ -93,7 +93,12 @@ container_entrypoint() { ensure_sommelier() { assert_image_exists dobu/deps-sommelier remove_stale_container dobu-deps-sommelier - container_exists dobu-deps-sommelier && return + if container_exists dobu-deps-sommelier; then + [ -S "$DOBU_TMP/X11-unix/X1" ] && [ -S "$DOBU_TMP/xdg_runtime/wayland-1" ] && return + log "Killing non-functional Sommelier container" + podman kill dobu-deps-sommelier + podman rm -f dobu-deps-sommelier + fi rm -rf "$DOBU_TMP/xdg_runtime" || true rm -rf "$DOBU_TMP/X11-unix" || true