X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dsa-metapackages.git;a=blobdiff_plain;f=apache2-vhost-update;h=24d59c8853fc907c6b0c4a48c2a0ed335f36b340;hp=5bddf71c3b196e6c19e8d8441bb02af91698d18d;hb=a62f3861b20eb2a89839c1a1f53d2230ed615246;hpb=f55cc31f294df5766f3c973704653a93820e2e9d diff --git a/apache2-vhost-update b/apache2-vhost-update index 5bddf71..24d59c8 100755 --- a/apache2-vhost-update +++ b/apache2-vhost-update @@ -122,6 +122,20 @@ if grep -i include "$DESTINATION/$site" > /dev/null; then exit 1 fi +if grep -i LoadModule "$DESTINATION/$site" > /dev/null; then + echo "New site may have LoadModule statements - rejecting." >&2 + rm -f "$DESTINATION/$site" + co "$DESTINATION/$site" + exit 1 +fi + +if grep -i LoadFile "$DESTINATION/$site" > /dev/null; then + echo "New site may have LoadFile statements - rejecting." >&2 + rm -f "$DESTINATION/$site" + co "$DESTINATION/$site" + exit 1 +fi + /usr/sbin/apache2ctl configtest if [ "$?" != "0" ]; then echo "configtest returned errors; reverting." >&2