[27317] | 1 | #!/bin/sh
|
---|
| 2 |
|
---|
| 3 |
|
---|
[27340] | 4 | source $GEXT_AFREPO/AFR-SETUP.sh
|
---|
[27317] | 5 |
|
---|
| 6 |
|
---|
| 7 | has_afrepo_conf=`egrep "^Include conf/httpd-afrepo.conf" "$GEXTAMP_INSTALLED/conf/httpd.conf"`
|
---|
| 8 |
|
---|
| 9 | if [ "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"
|
---|
| 15 | fi
|
---|
| 16 |
|
---|
[27680] | 17 | echo ""
|
---|
| 18 | echo "** Regnerating httpd-afrepo.conf"
|
---|
[27317] | 19 | cat "httpd-afrepo.conf.in" \
|
---|
[27680] | 20 | | sed "s%@4store-http-prefix@%$protocol://$f4store_hostname:$f4store_port%g" > "$GEXTAMP_INSTALLED/conf/httpd-afrepo.conf"
|
---|
[27317] | 21 |
|
---|
| 22 |
|
---|
[27680] | 23 | public_facing_url="$protocol://$public_facing_hostname"
|
---|
| 24 |
|
---|
| 25 | if [ "x$public_facing_port" != "x" ] ; then
|
---|
| 26 | public_facing_url="$public_facing_url:$public_facing_port"
|
---|
| 27 | fi
|
---|
| 28 |
|
---|
| 29 | if [ "x$public_facing_url_prefix" != "x" ] ; then
|
---|
| 30 | public_facing_url="$public_facing_url$public_facing_url_prefix"
|
---|
| 31 | fi
|
---|
| 32 |
|
---|
| 33 | public_facing_url="$public_facing_url/"
|
---|
| 34 |
|
---|
| 35 |
|
---|
| 36 |
|
---|
| 37 | public_facing_f4store_url="$protocol://$public_facing_f4store_hostname"
|
---|
| 38 |
|
---|
| 39 | if [ "x$public_facing_f4store_port" != "x" ] ; then
|
---|
| 40 | public_facing_f4store_url="$public_facing_f4store_url:$public_facing_f4store_port"
|
---|
| 41 | fi
|
---|
| 42 |
|
---|
| 43 | if [ "x$public_facing_f4store_url_prefix" != "x" ] ; then
|
---|
| 44 | public_facing_f4store_url="$public_facing_f4store_url$public_facing_f4store_url_prefix"
|
---|
| 45 | fi
|
---|
| 46 |
|
---|
| 47 | public_facing_f4store_url="$public_facing_f4store_url/"
|
---|
| 48 |
|
---|
| 49 |
|
---|
[27317] | 50 | echo ""
|
---|
| 51 | echo "** Regenerating AFRepo.class.php"
|
---|
| 52 | cat "AFRepo.GSDLEXT.class.php.in" \
|
---|
| 53 | | sed "s%@afrepo-http-prefix@%$protocol://$hostname:$port%g" \
|
---|
[27680] | 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"
|
---|
[27317] | 58 |
|
---|
| 59 |
|
---|
[27680] | 60 |
|
---|
| 61 | echo ""
|
---|
| 62 | echo "** Copying static HTML content (images, CSS etc) to htdocs/afrepo"
|
---|
| 63 | /bin/cp -r html/* "$GEXTAMP_INSTALLED/htdocs/afrepo/." |
---|