X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dsa-metapackages.git;a=blobdiff_plain;f=apache2-vhost-update;h=a61369edeecf9c9b2622dabc94b3435efdd0c526;hp=61c5bf369567ec375acd91039e470a6aafaca1b3;hb=15fadc336d0d511bd4faac6f1031985070d9a12d;hpb=09efc8cd9d37f03c72dae07112972b145fee82b8 diff --git a/apache2-vhost-update b/apache2-vhost-update index 61c5bf3..a61369e 100755 --- a/apache2-vhost-update +++ b/apache2-vhost-update @@ -112,8 +112,16 @@ if [ "$?" != "0" ]; then echo "Could not get a lock/checkout $DESTINATION/$site." >&2 exit 1 fi + cp -f "$STATINGDIR/$site" "$DESTINATION/$site" +if grep -i include "$DESTINATION/$site" > /dev/null; then + echo "New site may have include 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