| 1 |
#! /bin/sh |
| 2 |
set -e |
| 3 |
#set -x |
| 4 |
|
| 5 |
. /usr/share/debconf/confmodule |
| 6 |
|
| 7 |
. /usr/lib/oar/setup/www-conf.sh |
| 8 |
. /usr/lib/oar/setup/monika.sh |
| 9 |
. /usr/lib/oar/setup/drawgantt-svg.sh |
| 10 |
|
| 11 |
PACKAGE=oar-web-status |
| 12 |
|
| 13 |
case "$1" in |
| 14 |
configure) |
| 15 |
www_conf_setup |
| 16 |
monika_setup |
| 17 |
drawgantt_svg_setup |
| 18 |
MSG="Please enable an Apache CGI module (e.g. cgi or cgid) for the Monika web app to function." |
| 19 |
if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then |
| 20 |
. /usr/share/apache2/apache2-maintscript-helper |
| 21 |
apache2_has_module cgi || apache2_has_module cgid || apache2_msg info "$MSG" |
| 22 |
apache2_invoke enconf oar-web-status.conf || exit $? |
| 23 |
else |
| 24 |
echo "$MSG" |
| 25 |
fi |
| 26 |
# old config file (should not be there anymore) |
| 27 |
rm -f /etc/apache2/conf.d/oar-web-status.conf || true |
| 28 |
;; |
| 29 |
|
| 30 |
abort-upgrade|abort-remove|abort-deconfigure) |
| 31 |
;; |
| 32 |
|
| 33 |
*) |
| 34 |
echo "postinst called with unknown argument \`$1'" >&2 |
| 35 |
exit 1 |
| 36 |
;; |
| 37 |
esac |
| 38 |
|
| 39 |
#DEBHELPER# |
| 40 |
|
| 41 |
exit 0 |
| 42 |
|
| 43 |
|