Skip to content

Commit

Permalink
Added go-replace
Browse files Browse the repository at this point in the history
Replaced rpl with go-replace (no python dependency)
  • Loading branch information
mblaschke committed Apr 3, 2017
1 parent 0c68574 commit 862f1b5
Show file tree
Hide file tree
Showing 191 changed files with 577 additions and 531 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<WEB_NO_CACHE_PATTERN>" "$WEB_NO_CACHE_PATTERN" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace "<WEB_NO_CACHE_PATTERN>" -r "$WEB_NO_CACHE_PATTERN" -- > /dev/null
Original file line number Diff line number Diff line change
@@ -1 +1 @@
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<WEB_NO_CACHE_PATTERN>" "$WEB_NO_CACHE_PATTERN" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace "<WEB_NO_CACHE_PATTERN>" -r "$WEB_NO_CACHE_PATTERN" -- > /dev/null
Original file line number Diff line number Diff line change
@@ -1 +1 @@
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<WEB_NO_CACHE_PATTERN>" "$WEB_NO_CACHE_PATTERN" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace "<WEB_NO_CACHE_PATTERN>" -r "$WEB_NO_CACHE_PATTERN" -- > /dev/null
Original file line number Diff line number Diff line change
@@ -1 +1 @@
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<WEB_NO_CACHE_PATTERN>" "$WEB_NO_CACHE_PATTERN" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace "<WEB_NO_CACHE_PATTERN>" -r "$WEB_NO_CACHE_PATTERN" -- > /dev/null
Original file line number Diff line number Diff line change
@@ -1 +1 @@
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<WEB_NO_CACHE_PATTERN>" "$WEB_NO_CACHE_PATTERN" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace "<WEB_NO_CACHE_PATTERN>" -r "$WEB_NO_CACHE_PATTERN" -- > /dev/null
Original file line number Diff line number Diff line change
@@ -1 +1 @@
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<WEB_NO_CACHE_PATTERN>" "$WEB_NO_CACHE_PATTERN" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace "<WEB_NO_CACHE_PATTERN>" -r "$WEB_NO_CACHE_PATTERN" -- > /dev/null
Original file line number Diff line number Diff line change
@@ -1 +1 @@
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<WEB_NO_CACHE_PATTERN>" "$WEB_NO_CACHE_PATTERN" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace "<WEB_NO_CACHE_PATTERN>" -r "$WEB_NO_CACHE_PATTERN" -- > /dev/null
Original file line number Diff line number Diff line change
@@ -1 +1 @@
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<WEB_NO_CACHE_PATTERN>" "$WEB_NO_CACHE_PATTERN" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace "<WEB_NO_CACHE_PATTERN>" -r "$WEB_NO_CACHE_PATTERN" -- > /dev/null
Original file line number Diff line number Diff line change
@@ -1 +1 @@
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<WEB_NO_CACHE_PATTERN>" "$WEB_NO_CACHE_PATTERN" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace "<WEB_NO_CACHE_PATTERN>" -r "$WEB_NO_CACHE_PATTERN" -- > /dev/null
Original file line number Diff line number Diff line change
@@ -1 +1 @@
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<WEB_NO_CACHE_PATTERN>" "$WEB_NO_CACHE_PATTERN" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace "<WEB_NO_CACHE_PATTERN>" -r "$WEB_NO_CACHE_PATTERN" -- > /dev/null
Original file line number Diff line number Diff line change
@@ -1 +1 @@
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<WEB_NO_CACHE_PATTERN>" "$WEB_NO_CACHE_PATTERN" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace "<WEB_NO_CACHE_PATTERN>" -r "$WEB_NO_CACHE_PATTERN" -- > /dev/null
10 changes: 5 additions & 5 deletions docker/apache/alpine-3/conf/bin/service.d/httpd.d/10-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ if [[ ! -e "$WEB_DOCUMENT_ROOT" ]]; then
fi

# Replace markers
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_INDEX>" "$WEB_DOCUMENT_INDEX" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_ROOT>" "$WEB_DOCUMENT_ROOT" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<ALIAS_DOMAIN>" "$WEB_ALIAS_DOMAIN" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<SERVERNAME>" "$HOSTNAME" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<DOCUMENT_INDEX>" -r "$WEB_DOCUMENT_INDEX"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<DOCUMENT_ROOT>" -r "$WEB_DOCUMENT_ROOT"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<ALIAS_DOMAIN>" -r "$WEB_ALIAS_DOMAIN"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<SERVERNAME>" -r "$HOSTNAME"

if [[ -n "${WEB_PHP_SOCKET+x}" ]]; then
## WEB_PHP_SOCKET is set
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<PHP_SOCKET>" "$WEB_PHP_SOCKET" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<PHP_SOCKET>" -r "$WEB_PHP_SOCKET"
else
## WEB_PHP_SOCKET is not set, remove PHP files
rm -f -- /opt/docker/etc/httpd/conf.d/10-php.conf
Expand Down
10 changes: 5 additions & 5 deletions docker/apache/centos-7/conf/bin/service.d/httpd.d/10-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ if [[ ! -e "$WEB_DOCUMENT_ROOT" ]]; then
fi

# Replace markers
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_INDEX>" "$WEB_DOCUMENT_INDEX" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_ROOT>" "$WEB_DOCUMENT_ROOT" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<ALIAS_DOMAIN>" "$WEB_ALIAS_DOMAIN" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<SERVERNAME>" "$HOSTNAME" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<DOCUMENT_INDEX>" -r "$WEB_DOCUMENT_INDEX"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<DOCUMENT_ROOT>" -r "$WEB_DOCUMENT_ROOT"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<ALIAS_DOMAIN>" -r "$WEB_ALIAS_DOMAIN"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<SERVERNAME>" -r "$HOSTNAME"

if [[ -n "${WEB_PHP_SOCKET+x}" ]]; then
## WEB_PHP_SOCKET is set
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<PHP_SOCKET>" "$WEB_PHP_SOCKET" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<PHP_SOCKET>" -r "$WEB_PHP_SOCKET"
else
## WEB_PHP_SOCKET is not set, remove PHP files
rm -f -- /opt/docker/etc/httpd/conf.d/10-php.conf
Expand Down
10 changes: 5 additions & 5 deletions docker/apache/debian-7/conf/bin/service.d/httpd.d/10-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ if [[ ! -e "$WEB_DOCUMENT_ROOT" ]]; then
fi

# Replace markers
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_INDEX>" "$WEB_DOCUMENT_INDEX" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_ROOT>" "$WEB_DOCUMENT_ROOT" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<ALIAS_DOMAIN>" "$WEB_ALIAS_DOMAIN" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<SERVERNAME>" "$HOSTNAME" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<DOCUMENT_INDEX>" -r "$WEB_DOCUMENT_INDEX"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<DOCUMENT_ROOT>" -r "$WEB_DOCUMENT_ROOT"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<ALIAS_DOMAIN>" -r "$WEB_ALIAS_DOMAIN"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<SERVERNAME>" -r "$HOSTNAME"

if [[ -n "${WEB_PHP_SOCKET+x}" ]]; then
## WEB_PHP_SOCKET is set
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<PHP_SOCKET>" "$WEB_PHP_SOCKET" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<PHP_SOCKET>" -r "$WEB_PHP_SOCKET"
else
## WEB_PHP_SOCKET is not set, remove PHP files
rm -f -- /opt/docker/etc/httpd/conf.d/10-php.conf
Expand Down
10 changes: 5 additions & 5 deletions docker/apache/debian-8/conf/bin/service.d/httpd.d/10-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ if [[ ! -e "$WEB_DOCUMENT_ROOT" ]]; then
fi

# Replace markers
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_INDEX>" "$WEB_DOCUMENT_INDEX" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_ROOT>" "$WEB_DOCUMENT_ROOT" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<ALIAS_DOMAIN>" "$WEB_ALIAS_DOMAIN" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<SERVERNAME>" "$HOSTNAME" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<DOCUMENT_INDEX>" -r "$WEB_DOCUMENT_INDEX"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<DOCUMENT_ROOT>" -r "$WEB_DOCUMENT_ROOT"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<ALIAS_DOMAIN>" -r "$WEB_ALIAS_DOMAIN"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<SERVERNAME>" -r "$HOSTNAME"

if [[ -n "${WEB_PHP_SOCKET+x}" ]]; then
## WEB_PHP_SOCKET is set
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<PHP_SOCKET>" "$WEB_PHP_SOCKET" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<PHP_SOCKET>" -r "$WEB_PHP_SOCKET"
else
## WEB_PHP_SOCKET is not set, remove PHP files
rm -f -- /opt/docker/etc/httpd/conf.d/10-php.conf
Expand Down
10 changes: 5 additions & 5 deletions docker/apache/debian-9/conf/bin/service.d/httpd.d/10-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ if [[ ! -e "$WEB_DOCUMENT_ROOT" ]]; then
fi

# Replace markers
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_INDEX>" "$WEB_DOCUMENT_INDEX" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_ROOT>" "$WEB_DOCUMENT_ROOT" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<ALIAS_DOMAIN>" "$WEB_ALIAS_DOMAIN" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<SERVERNAME>" "$HOSTNAME" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<DOCUMENT_INDEX>" -r "$WEB_DOCUMENT_INDEX"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<DOCUMENT_ROOT>" -r "$WEB_DOCUMENT_ROOT"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<ALIAS_DOMAIN>" -r "$WEB_ALIAS_DOMAIN"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<SERVERNAME>" -r "$HOSTNAME"

if [[ -n "${WEB_PHP_SOCKET+x}" ]]; then
## WEB_PHP_SOCKET is set
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<PHP_SOCKET>" "$WEB_PHP_SOCKET" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<PHP_SOCKET>" -r "$WEB_PHP_SOCKET"
else
## WEB_PHP_SOCKET is not set, remove PHP files
rm -f -- /opt/docker/etc/httpd/conf.d/10-php.conf
Expand Down
10 changes: 5 additions & 5 deletions docker/apache/ubuntu-12.04/conf/bin/service.d/httpd.d/10-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ if [[ ! -e "$WEB_DOCUMENT_ROOT" ]]; then
fi

# Replace markers
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_INDEX>" "$WEB_DOCUMENT_INDEX" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_ROOT>" "$WEB_DOCUMENT_ROOT" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<ALIAS_DOMAIN>" "$WEB_ALIAS_DOMAIN" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<SERVERNAME>" "$HOSTNAME" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<DOCUMENT_INDEX>" -r "$WEB_DOCUMENT_INDEX"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<DOCUMENT_ROOT>" -r "$WEB_DOCUMENT_ROOT"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<ALIAS_DOMAIN>" -r "$WEB_ALIAS_DOMAIN"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<SERVERNAME>" -r "$HOSTNAME"

if [[ -n "${WEB_PHP_SOCKET+x}" ]]; then
## WEB_PHP_SOCKET is set
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<PHP_SOCKET>" "$WEB_PHP_SOCKET" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<PHP_SOCKET>" -r "$WEB_PHP_SOCKET"
else
## WEB_PHP_SOCKET is not set, remove PHP files
rm -f -- /opt/docker/etc/httpd/conf.d/10-php.conf
Expand Down
10 changes: 5 additions & 5 deletions docker/apache/ubuntu-14.04/conf/bin/service.d/httpd.d/10-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ if [[ ! -e "$WEB_DOCUMENT_ROOT" ]]; then
fi

# Replace markers
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_INDEX>" "$WEB_DOCUMENT_INDEX" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_ROOT>" "$WEB_DOCUMENT_ROOT" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<ALIAS_DOMAIN>" "$WEB_ALIAS_DOMAIN" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<SERVERNAME>" "$HOSTNAME" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<DOCUMENT_INDEX>" -r "$WEB_DOCUMENT_INDEX"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<DOCUMENT_ROOT>" -r "$WEB_DOCUMENT_ROOT"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<ALIAS_DOMAIN>" -r "$WEB_ALIAS_DOMAIN"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<SERVERNAME>" -r "$HOSTNAME"

if [[ -n "${WEB_PHP_SOCKET+x}" ]]; then
## WEB_PHP_SOCKET is set
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<PHP_SOCKET>" "$WEB_PHP_SOCKET" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<PHP_SOCKET>" -r "$WEB_PHP_SOCKET"
else
## WEB_PHP_SOCKET is not set, remove PHP files
rm -f -- /opt/docker/etc/httpd/conf.d/10-php.conf
Expand Down
10 changes: 5 additions & 5 deletions docker/apache/ubuntu-15.04/conf/bin/service.d/httpd.d/10-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ if [[ ! -e "$WEB_DOCUMENT_ROOT" ]]; then
fi

# Replace markers
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_INDEX>" "$WEB_DOCUMENT_INDEX" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_ROOT>" "$WEB_DOCUMENT_ROOT" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<ALIAS_DOMAIN>" "$WEB_ALIAS_DOMAIN" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<SERVERNAME>" "$HOSTNAME" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<DOCUMENT_INDEX>" -r "$WEB_DOCUMENT_INDEX"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<DOCUMENT_ROOT>" -r "$WEB_DOCUMENT_ROOT"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<ALIAS_DOMAIN>" -r "$WEB_ALIAS_DOMAIN"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<SERVERNAME>" -r "$HOSTNAME"

if [[ -n "${WEB_PHP_SOCKET+x}" ]]; then
## WEB_PHP_SOCKET is set
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<PHP_SOCKET>" "$WEB_PHP_SOCKET" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<PHP_SOCKET>" -r "$WEB_PHP_SOCKET"
else
## WEB_PHP_SOCKET is not set, remove PHP files
rm -f -- /opt/docker/etc/httpd/conf.d/10-php.conf
Expand Down
10 changes: 5 additions & 5 deletions docker/apache/ubuntu-15.10/conf/bin/service.d/httpd.d/10-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ if [[ ! -e "$WEB_DOCUMENT_ROOT" ]]; then
fi

# Replace markers
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_INDEX>" "$WEB_DOCUMENT_INDEX" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_ROOT>" "$WEB_DOCUMENT_ROOT" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<ALIAS_DOMAIN>" "$WEB_ALIAS_DOMAIN" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<SERVERNAME>" "$HOSTNAME" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<DOCUMENT_INDEX>" -r "$WEB_DOCUMENT_INDEX"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<DOCUMENT_ROOT>" -r "$WEB_DOCUMENT_ROOT"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<ALIAS_DOMAIN>" -r "$WEB_ALIAS_DOMAIN"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<SERVERNAME>" -r "$HOSTNAME"

if [[ -n "${WEB_PHP_SOCKET+x}" ]]; then
## WEB_PHP_SOCKET is set
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<PHP_SOCKET>" "$WEB_PHP_SOCKET" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<PHP_SOCKET>" -r "$WEB_PHP_SOCKET"
else
## WEB_PHP_SOCKET is not set, remove PHP files
rm -f -- /opt/docker/etc/httpd/conf.d/10-php.conf
Expand Down
10 changes: 5 additions & 5 deletions docker/apache/ubuntu-16.04/conf/bin/service.d/httpd.d/10-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ if [[ ! -e "$WEB_DOCUMENT_ROOT" ]]; then
fi

# Replace markers
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_INDEX>" "$WEB_DOCUMENT_INDEX" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_ROOT>" "$WEB_DOCUMENT_ROOT" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<ALIAS_DOMAIN>" "$WEB_ALIAS_DOMAIN" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<SERVERNAME>" "$HOSTNAME" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<DOCUMENT_INDEX>" -r "$WEB_DOCUMENT_INDEX"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<DOCUMENT_ROOT>" -r "$WEB_DOCUMENT_ROOT"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<ALIAS_DOMAIN>" -r "$WEB_ALIAS_DOMAIN"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<SERVERNAME>" -r "$HOSTNAME"

if [[ -n "${WEB_PHP_SOCKET+x}" ]]; then
## WEB_PHP_SOCKET is set
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<PHP_SOCKET>" "$WEB_PHP_SOCKET" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<PHP_SOCKET>" -r "$WEB_PHP_SOCKET"
else
## WEB_PHP_SOCKET is not set, remove PHP files
rm -f -- /opt/docker/etc/httpd/conf.d/10-php.conf
Expand Down
10 changes: 5 additions & 5 deletions docker/apache/ubuntu-16.10/conf/bin/service.d/httpd.d/10-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ if [[ ! -e "$WEB_DOCUMENT_ROOT" ]]; then
fi

# Replace markers
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_INDEX>" "$WEB_DOCUMENT_INDEX" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_ROOT>" "$WEB_DOCUMENT_ROOT" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<ALIAS_DOMAIN>" "$WEB_ALIAS_DOMAIN" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<SERVERNAME>" "$HOSTNAME" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<DOCUMENT_INDEX>" -r "$WEB_DOCUMENT_INDEX"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<DOCUMENT_ROOT>" -r "$WEB_DOCUMENT_ROOT"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<ALIAS_DOMAIN>" -r "$WEB_ALIAS_DOMAIN"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<SERVERNAME>" -r "$HOSTNAME"

if [[ -n "${WEB_PHP_SOCKET+x}" ]]; then
## WEB_PHP_SOCKET is set
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<PHP_SOCKET>" "$WEB_PHP_SOCKET" > /dev/null
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r go-replace -s "<PHP_SOCKET>" -r "$WEB_PHP_SOCKET"
else
## WEB_PHP_SOCKET is not set, remove PHP files
rm -f -- /opt/docker/etc/httpd/conf.d/10-php.conf
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ if [ ! -S /var/lib/syslog-ng/syslog-ng.ctl ]; then rm -f /var/lib/syslog-ng/sysl

if [[ ! -p /docker.stdout ]]; then
# Switch to file (tty docker mode)
rpl --quiet 'pipe("/docker.stdout")' 'file("/docker.stdout")' -- /opt/docker/etc/syslog-ng/syslog-ng.conf > /dev/null
go-replace -s 'pipe("/docker.stdout")' -r 'file("/docker.stdout")' -- /opt/docker/etc/syslog-ng/syslog-ng.conf
fi

0 comments on commit 862f1b5

Please sign in to comment.