#!/bin/sh
set -e

if [ "$1" = purge ] || [ "$1" = remove ]; then
  rm -rf /run/screen
fi

if [ "$1" = purge ]; then
  rm -vf /etc/tmpfiles.d/screen-cleanup.conf

  # LP #1462692
  rm -f /lib/systemd/system/screen-cleanup.service
  rmdir -p --ignore-fail-on-non-empty /lib/systemd/system
fi

# Automatically added by dh_installinit/13.14.1ubuntu5
if [ "$1" = "remove" ] && [ -x "/etc/init.d/screen-cleanup" ] ; then
	chmod -x "/etc/init.d/screen-cleanup" >/dev/null || true
fi
if [ -z "${DPKG_ROOT:-}" ] && [ "$1" = "purge" ] ; then
	update-rc.d screen-cleanup remove >/dev/null
fi
# End automatically added section

