From 02aea7237fa255266f7b71eb0a9114c12aa3c034 Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 13 Mar 2004 00:50:41 +0000 Subject: [PATCH] automatically set Mason comp_root in Makefile --- Makefile | 4 ++++ htetc/handler.pl | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 3c4683849..1b212b387 100644 --- a/Makefile +++ b/Makefile @@ -121,6 +121,10 @@ install-docs: docs [ "${TEMPLATE}" = "asp" ] && chown -R freeside ${ASP_GLOBAL} || true [ "${TEMPLATE}" = "asp" ] && cp htetc/global.asa ${ASP_GLOBAL} || true [ "${TEMPLATE}" = "mason" ] && cp htetc/handler.pl ${MASON_HANDLER} || true + [ "${TEMPLATE}" = "mason" ] && + perl -p -i -e "\ + s/%%%FREESIDE_DOCUMENT_ROOT%%%/${FREESIDE_DOCUMENT_ROOT}/g; + " ${MASON_HANDLER} [ "${TEMPLATE}" = "mason" -a ! -e ${MASONDATA} ] && mkdir ${MASONDATA} || true [ "${TEMPLATE}" = "mason" ] && chown -R freeside ${MASONDATA} || true diff --git a/htetc/handler.pl b/htetc/handler.pl index 0301d98d1..8541b4ce5 100644 --- a/htetc/handler.pl +++ b/htetc/handler.pl @@ -38,7 +38,7 @@ use strict; my $ah = new HTML::Mason::ApacheHandler ( #interp => $interp, #auto_send_headers => 0, - comp_root=>'/var/www/freeside', + comp_root=>'%%%FREESIDE_DOCUMENT_ROOT%%%', data_dir=>'/usr/local/etc/freeside/masondata', #out_mode=>'stream', ); -- 2.11.0