1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
#!/bin/bash set -eu RC=0 fail () { echo "FAIL: $@" >&2 RC=1 } declare -a REQUIRED_MODS REQUIRED_MODS=( alias auth_basic authn_core authz_core log_config mime reqtimeout version watchdog ) for m in "${REQUIRED_MODS[@]}" ; do apachectl -M | grep -w "${m}_module" || fail "Module $m not activated" done exit $RC