#!/usr/bin/sh

set -e
set -u

case "${1}" in
  remove)
    if [ -x '/usr/bin/deb-systemd-invoke' ]; then
      /usr/bin/deb-systemd-invoke stop 'trash-bin.timer' > '/dev/null' 2>&1 || \
        /usr/bin/true
      /usr/bin/deb-systemd-invoke stop 'trash-bin.service' > '/dev/null' 2>&1 || \
        /usr/bin/true
      /usr/bin/deb-systemd-invoke disable 'trash-bin.timer' > '/dev/null' 2>&1 || \
        /usr/bin/true
    fi
  ;;
esac
