* fixed E17 Full Module Module by implying the Basic Module
[mnemosyne.git] / pkg_conf / apache.conf
blob645785b55fdb41696268b59a61e815cde8fe9005
1 #!/bin/sh
2 # --- T2-COPYRIGHT-NOTE-BEGIN ---
3 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
4 #
5 # T2 SDE: target/mnemosyne/pkg_conf/apache.conf
6 # Copyright (C) 2004 - 2006 The T2 SDE Project
7 #
8 # More information can be found in the files COPYING and README.
9 #
10 # This program is free software; you can redistribute it and/or modify
11 # it under the terms of the GNU General Public License as published by
12 # the Free Software Foundation; version 2 of the License. A copy of the
13 # GNU General Public License can be found in the file COPYING.
14 # --- T2-COPYRIGHT-NOTE-END ---
16 if [ "${SDECFG_PKG_APACHE_DOCROOT:0:1}" == "/" ]; then
17 docroot=$( echo "$SDECFG_PKG_APACHE_DOCROOT" | sed -e 's,/\([^/]*\).*,\1,g' )
18 if [ -z "$( echo $flistroot | tr ' ' '\n' | grep -e "^$docroot\$" )" ]; then
19 var_append flistroot ' ' $docroot
20 mkdir -p "$xroot/$SDECFG_PKG_APACHE_DOCROOT"
21 # ln -s "$xroot/$SDECFG_PKG_APACHE_DOCROOT" "$SDECFG_PKG_APACHE_DOCROOT"
25 hook_add postmake 5 'mnemosyne_adapt_apache'
27 mnemosyne_adapt_apache() {
28 mkdir -vp $sysconfdir/{conf,hosts}.d
30 if ! grep -q "Include $sysconfdir/conf.d/\*.conf" $sysconfdir/httpd.conf; then
31 echo "Include $sysconfdir/conf.d/*.conf" \
32 >> $sysconfdir/httpd.conf
35 cat <<-EOT > $sysconfdir/conf.d/vhost.conf-dist
36 NameVirtualHost *:80
38 Include $sysconfdir/hosts.d/*.conf
39 EOT