+debian.org (8) stable; urgency=low
+
+ * Install restart-apache script.
+
+ -- Martin Zobel-Helas <zobel@debian.org> Sun, 07 Dec 2008 15:35:45 +0100
+
debian.org (7) stable; urgency=low
* Depend on libpam-pwdfile.
Section: local/admin
Priority: required
Maintainer: Debian sysadmin Team <debian-admin@debian.org>
-Uploaders: Ryan Murray <rmurray@debian.org>, Peter Palfrader <weasel@debian.org>
+Uploaders: Ryan Murray <rmurray@debian.org>, Peter Palfrader <weasel@debian.org>, Martin Zobel-Helas <zobel@debian.org>
Standards-Version: 3.7.2
Package: debian.org
This is a metapackage for DSA maintained debian.org hosts.
Copyright (c) 2007, Ryan Murray
+ (c) 2008, Peter Palfrader
+ (c) 2008, Martin Zobel-Helas
License: GPL; see /usr/share/common-licenses/GPL
chown -R root.root debian/tmp
chmod -R g-ws debian/tmp
install -m755 upgrade-porter-chroots debian/tmp/usr/sbin
+ install -m755 restart-apache debian/tmp/usr/sbin
install -m644 debian/copyright debian/tmp/usr/share/doc/debian.org/
install -m644 debian/changelog debian/tmp/usr/share/doc/debian.org/changelog
gzip -9f debian/tmp/usr/share/doc/debian.org/changelog
--- /dev/null
+#!/bin/bash
+
+# needs:
+# %apachectrl ALL=(root) /usr/sbin/restart-apache
+
+case $1 in
+ restart)
+ action="restart"
+ ;;
+ reload)
+ action="reload"
+ ;;
+ *)
+ echo "Usage: $0 [restart|reload]"
+ ;;
+esac
+
+if [ -x /usr/sbin/apache2ctl ]; then
+
+ /usr/sbin/apache2ctl configtest
+
+ if [ "$?" != "0" ]; then
+ env -i /etc/init.d/apache2 $action
+ else
+ echo "configtest returned errors, thus not restarting apache"
+ exit 1
+ fi
+else
+ echo "Ehhh, there is no Apache2 on this machine"
+ exit 2
+fi
+