Allow triggers to use maintscript helper to restart apache
When upgrading libapache2-mod-php{7,4,8.1} and possibly other php versions, the postinst script of these packages uses a trigger to try and restart apache2. However, the maintscript helper doesn't have a code path that allows this. The net result is that after updating mod-php, apache is still running with an older version of php.
See also: https://bugs.launchpad.net/ubuntu/+source/php8.1/+bug/2038912