#!/bin/sh
set -ex

# Check to make sure that module loads haven't been duplicated.
# Since this is potential minefield that could cause chaos, and a fix is
# currently in the Ubuntu delta, check specifically for it.

# Why is this so bad? See:
#   https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1251939
#   https://issues.apache.org/bugzilla/show_bug.cgi?id=55787

if [ "$(apache2ctl -l -M|sort|uniq -d)" != "" ]; then
	echo Duplicate module loads found
	exit 1
fi
