#!/usr/bin/sh

# See https://bugs.debian.org/1143583

systemctl start tomcat11.service
sleep 5
systemctl status tomcat11.service

echo "checking for incompatibility messages"

ret=$(grep "SEVERE.*An incompatible version.*of the Apache Tomcat Native library is installed" /var/log/tomcat11/catalina* || true)
if [ "$ret" ]; then
    printf >&2 "Error: $ret"
    false
fi
