#!/bin/sh
#
# /etc/X11/@kdm_package@/Xreset_0
#
# This script is run as root after the session on :0 ends.

# Call the global Xreset script, if it exists
if [ -x /etc/X11/@kdm_package@/Xreset ]; then
  /etc/X11/@kdm_package@/Xreset
fi

# :0 specific reset commands go here
if [ -e /var/run/xconsole_0.pid ]; then
  pid=$(cat /var/run/xconsole_0.pid 2> /dev/null)
  if [ "$pid" ]; then
    kill $pid 2> /dev/null
  fi
  rm /var/run/xconsole_0.pid
fi

exit 0
