chiark
/
gitweb
/
~ianmdlvl
/
dsa-metapackages.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
python-xml
[dsa-metapackages.git]
/
apache2-vhost-update
diff --git
a/apache2-vhost-update
b/apache2-vhost-update
index 61c5bf369567ec375acd91039e470a6aafaca1b3..46643e80f8f3588e951307527215530f72ff76e2 100755
(executable)
--- a/
apache2-vhost-update
+++ b/
apache2-vhost-update
@@
-16,7
+16,7
@@
# All config changes are tracked in RCS.
#
# needs something like this in sudoers:
# All config changes are tracked in RCS.
#
# needs something like this in sudoers:
-# %apachectrl ALL=(root) /usr/sbin/
restart-apach
e
+# %apachectrl ALL=(root) /usr/sbin/
apache2-vhost-updat
e
# Copyright (c) 2009 Peter Palfrader <peter@palfrader.org>
# Copyright (c) 2009 Peter Palfrader <peter@palfrader.org>
@@
-112,8
+112,16
@@
if [ "$?" != "0" ]; then
echo "Could not get a lock/checkout $DESTINATION/$site." >&2
exit 1
fi
echo "Could not get a lock/checkout $DESTINATION/$site." >&2
exit 1
fi
+
cp -f "$STATINGDIR/$site" "$DESTINATION/$site"
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
/usr/sbin/apache2ctl configtest
if [ "$?" != "0" ]; then
echo "configtest returned errors; reverting." >&2