1
2
3
4
5
#!/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