#!/bin/sh # Edit the following two lines as appropriate protocol=http hostname=`hostname` port=`egrep "^Listen" $GEXTAMP_INSTALLED/conf/httpd.conf | awk '{print $2}'` f4store_port=`echo $port+1 | bc` has_afrepo_conf=`egrep "^Include conf/httpd-afrepo.conf" "$GEXTAMP_INSTALLED/conf/httpd.conf"` if [ "x$has_afrepo_conf" = "x" ] ; then # Not currently in file => append it echo "" echo "** Appending 'httpd-afrepo.conf' to main Apache config file" echo "Include conf/httpd-afrepo.conf" >> "$GEXTAMP_INSTALLED/conf/httpd.conf" fi cat "httpd-afrepo.conf.in" \ | sed "s%@4store-http-prefix@%$protocol://$hostname:$f4store_port%g" > "$GEXTAMP_INSTALLED/conf/httpd-afrepo.conf" echo "" echo "** Regenerating AFRepo.class.php" cat "AFRepo.GSDLEXT.class.php.in" \ | sed "s%@afrepo-http-prefix@%$protocol://$hostname:$port%g" \ | sed "s%@4store-http-prefix@%$protocol://$hostname:$f4store_port%g" > "$GEXTAMP_INSTALLED/htdocs/afrepo/AFRepo.class.php" cat DONE.txt \ | sed "s%@GEXTAMP_INSTALLED@%$GEXTAMP_INSTALLED%g" \ | sed "s%@4store-port@%$f4store_port%g" \ | sed "s%@afrepo-http-prefix@%$protocol://$hostname:$port%g"