# %apachectrl ALL=(root) /usr/sbin/apache2-vhost-update
-# Copyright (c) 2009 Peter Palfrader <peter@palfrader.org>
+# Copyright (c) 2009,2010 Peter Palfrader <peter@palfrader.org>
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
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
exit 1
fi
+echo "Differences:"
+rcsdiff -u "$DESTINATION/$site"
+
echo "update run by $USER($SUDO_USER) at `date -R -u` on `hostname -f`" | \
ci -u "$DESTINATION/$site"
if [ "$?" != "0" ]; then