Improved mnemosyne vserver module to include beecrypt as vhashify depends on it
[mnemosyne.git] / pkg_conf / apache.conf
blob8bfea873bddfd7efb875c42a88436ebe8a360ae8
1 # --- SDE-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
3
4 # Filename: target/mnemosyne/pkg_conf/apache.conf
5 # Copyright (C) 2002 - 2006 Alejandro Mery
6
7 # More information can be found in the files COPYING and README.
8
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; version 2 of the License. A copy of the
12 # GNU General Public License can be found in the file COPYING.
13 # --- SDE-COPYRIGHT-NOTE-END ---
15 if [ "${SDECFG_PKG_APACHE_DOCROOT:0:1}" == "/" ]; then
16         docroot=$( echo "$SDECFG_PKG_APACHE_DOCROOT" | sed -e 's,/\([^/]*\).*,\1,g' )
17         if [ -z "$( echo $flistroot | tr ' ' '\n' | grep -e "^$docroot\$" )" ]; then
18                 var_append flistroot ' ' $docroot
19                 mkdir -p "$xroot/$SDECFG_PKG_APACHE_DOCROOT"
20                 # ln -s "$xroot/$SDECFG_PKG_APACHE_DOCROOT" "$SDECFG_PKG_APACHE_DOCROOT"
21         fi
24 hook_add postmake 5 'mnemosyne_adapt_apache'
26 mnemosyne_adapt_apache() {
27         mkdir -vp $sysconfdir/{conf,hosts}.d
29         if ! grep -q "Include $sysconfdir/conf.d/\*.conf" $sysconfdir/httpd.conf; then
30                 echo "Include $sysconfdir/conf.d/*.conf" \
31                         >> $sysconfdir/httpd.conf
32         fi
34         cat <<-EOT > $sysconfdir/conf.d/vhost.conf-dist
35                 NameVirtualHost *:80
37                 Include $sysconfdir/hosts.d/*.conf
38         EOT