#
# POSTINSTALL SCRIPT FOR mpkg TOOL
# Do not use standalone
#

if [ "$installdir" == "" ]; then
        echo -e "\n\e[31mERROR - THIS SCRIPT MUST BE RUN FROM mpkg TOOL\e[0m\n"
        exit 1
fi

print $no$gr"\nStarting  postinstall ...\n"$no

a=`pwd`

# POSTINSTALL STUFF
cd $installdir


if [ -f "etc/httpd/httpd.conf" ]; then
	sed -i -e '/proxy_module/s/^#//' -e '/proxy_fcgi_module/s/^#//' \
		etc/httpd/httpd.conf
	echo 'ProxyPassMatch ^/(.*\.php)$ fcgi://127.0.0.1:9000/srv/www/$1' \
		>> etc/httpd/httpd.conf
fi


# END OF POSTINSTALL STUFF

cd "$a"



