* updated copyright notes at mnemosyne target
[mnemosyne.git] / pkg_conf / apache.conf
blob43dede4a9a50652b1a0bbdb2e2ef07199fe34196
1 #!/bin/sh
2 # --- SDE-COPYRIGHT-NOTE-BEGIN ---
3 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
4 #
5 # Filename: target/mnemosyne/pkg_conf/apache.conf
6 # Copyright (C) 2002 - 2006 Alejandro Mery
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 # --- SDE-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