projects
/
pazpar2-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e648fad
)
Reload apache2 in configure mode (install/upgrade)
author
Adam Dickmeiss
<adam@indexdata.dk>
Wed, 20 Jun 2007 19:24:43 +0000
(19:24 +0000)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Wed, 20 Jun 2007 19:24:43 +0000
(19:24 +0000)
debian/pazpar2-apache2.postinst
patch
|
blob
|
history
diff --git
a/debian/pazpar2-apache2.postinst
b/debian/pazpar2-apache2.postinst
index
1dd77a5
..
62d861e
100644
(file)
--- a/
debian/pazpar2-apache2.postinst
+++ b/
debian/pazpar2-apache2.postinst
@@
-1,7
+1,24
@@
#!/bin/sh
set -e
#!/bin/sh
set -e
-if [ ! -f /etc/apache2/mods-enabled/proxy_http.load ]; then
- a2enmod proxy_http
+
+if [ "$1" != "configure" ]; then
+ exit 0
fi
fi
+reload_apache()
+{
+ if apache2ctl configtest 2>/dev/null; then
+ invoke-rc.d apache2 force-reload || true
+ else
+ echo "Your apache2 configuration is broken, so we're not restarting it for you."
+ fi
+}
+
+if [ -e /etc/apache2/apache2.conf ]; then
+ if [ ! -f /etc/apache2/mods-enabled/proxy_http.load ]; then
+ a2enmod proxy_http || true
+ fi
+
+ reload_apache
+fi
exit 0
exit 0