source: gs2-extensions/afrepo/trunk/src/src/INSTALL-PHP.sh

Last change on this file was 28025, checked in by davidb, 11 years ago

Updating to reflect new location of httpd-afrepo.conf.in

  • Property svn:executable set to *
File size: 1.9 KB
Line 
1#!/bin/sh
2
3
4source $GEXT_AFREPO/AFR-SETUP.sh
5
6
7has_afrepo_conf=`egrep "^Include conf/httpd-afrepo.conf" "$GEXTAMP_INSTALLED/conf/httpd.conf"`
8
9if [ "x$has_afrepo_conf" = "x" ] ; then
10 # Not currently in file => append it
11
12 echo ""
13 echo "** Appending 'httpd-afrepo.conf' to main Apache config file"
14 echo "Include conf/httpd-afrepo.conf" >> "$GEXTAMP_INSTALLED/conf/httpd.conf"
15fi
16
17echo ""
18echo "** Regnerating httpd-afrepo.conf"
19cat "etc/httpd-afrepo.conf.in" \
20 | sed "s%@4store-http-prefix@%$protocol://$f4store_hostname:$f4store_port%g" > "$GEXTAMP_INSTALLED/conf/httpd-afrepo.conf"
21
22
23public_facing_url="$protocol://$public_facing_hostname"
24
25if [ "x$public_facing_port" != "x" ] ; then
26 public_facing_url="$public_facing_url:$public_facing_port"
27fi
28
29if [ "x$public_facing_url_prefix" != "x" ] ; then
30 public_facing_url="$public_facing_url$public_facing_url_prefix"
31fi
32
33public_facing_url="$public_facing_url/"
34
35
36
37public_facing_f4store_url="$protocol://$public_facing_f4store_hostname"
38
39if [ "x$public_facing_f4store_port" != "x" ] ; then
40 public_facing_f4store_url="$public_facing_f4store_url:$public_facing_f4store_port"
41fi
42
43if [ "x$public_facing_f4store_url_prefix" != "x" ] ; then
44 public_facing_f4store_url="$public_facing_f4store_url$public_facing_f4store_url_prefix"
45fi
46
47public_facing_f4store_url="$public_facing_f4store_url/"
48
49
50echo ""
51echo "** Regenerating AFRepo.class.php"
52cat "AFRepo.GSDLEXT.class.php.in" \
53 | sed "s%@afrepo-http-prefix@%$protocol://$hostname:$port%g" \
54 | sed "s%@4store-http-prefix@%$protocol://$f4store_hostname:$f4store_port%g" \
55 | sed "s%@public-facing-afrepo-http-prefix@%$public_facing_url%g" \
56 | sed "s%@public-facing-4store-http-prefix@%$public_facing_f4store_url%g" \
57 > "$GEXTAMP_INSTALLED/htdocs/afrepo/AFRepo.class.php"
58
59
60
61echo ""
62echo "** Copying static HTML content (images, CSS etc) to htdocs/afrepo"
63#/bin/cp -r html/* "$GEXTAMP_INSTALLED/htdocs/afrepo/."
64
65rsync -pav --exclude .svn html/* "$GEXTAMP_INSTALLED/htdocs/afrepo/."
Note: See TracBrowser for help on using the repository browser.