#!/bin/sh # terminate when X server becomes unavailable if ! s6-ipcclient "/tmp/.X11-unix/X${DISPLAY#:}" true; then printf i >/run/service/.s6-svscan/control fi