Is there a way to run a configtest utility (e.g. apache2ctl -t) before trying to restart a service when one of its configuration files changed?
Use case here is that I want to be resilient against configuration errors in an apache config (because apache just stops when it sees the config error, leaving me with a stopped apache)