post_install() {
    systemd-sysusers tomcat7.conf
    systemd-tmpfiles --create tomcat7.conf

  if [ -f lib/modules/$(uname -r)/kernel/security/capability.ko ]; then
    echo 'It appears that your current kernel has linux security'
    echo 'capabilities built as a module. Tomcat requires this'
    echo ' functionality to operate.'
  fi
}

post_upgrade() {
  post_install $1
}

pre_remove() {
  echo "Leftover files may reside in /var/{lib,tmp,log}/tomcat7"
  echo "If you remove them, you may also want to remove user and group 'tomcat7'"
}
