Restart Sommelier if it died

This commit is contained in:
Peter Cai 2023-07-18 19:03:41 -04:00
parent 0baefc7edc
commit 8ecfade5c4

View file

@ -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