Skip to content

Commit 7fe74da

Browse files
committed
Modularized service scripts
Add possibility to inject custom scripts for customization Fixes #82
1 parent 782c4c9 commit 7fe74da

File tree

454 files changed

+2303
-2818
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

454 files changed

+2303
-2818
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
if [[ ! -e "$WEB_DOCUMENT_ROOT" ]]; then
2+
echo ""
3+
echo "[WARNING] WEB_DOCUMENT_ROOT does not exists with path \"$WEB_DOCUMENT_ROOT\"!"
4+
echo ""
5+
fi
6+
7+
# Replace markers
8+
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_INDEX>" "$WEB_DOCUMENT_INDEX"
9+
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_ROOT>" "$WEB_DOCUMENT_ROOT"
10+
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<ALIAS_DOMAIN>" "$WEB_ALIAS_DOMAIN"
11+
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<SERVERNAME>" "$HOSTNAME"
Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
11
#!/usr/bin/env bash
22
set -e
3+
source /opt/docker/bin/config.sh
34

4-
if [[ ! -e "$WEB_DOCUMENT_ROOT" ]]; then
5-
echo ""
6-
echo "[WARNING] WEB_DOCUMENT_ROOT does not exists with path \"$WEB_DOCUMENT_ROOT\"!"
7-
echo ""
8-
fi
5+
includeScriptDir "/opt/docker/bin/service.d/httpd.d/"
96

107
# Apache gets grumpy about PID files pre-existing
118
rm -f /var/run/httpd/httpd.pid
129

13-
# Replace markers
14-
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_INDEX>" "$WEB_DOCUMENT_INDEX"
15-
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_ROOT>" "$WEB_DOCUMENT_ROOT"
16-
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<ALIAS_DOMAIN>" "$WEB_ALIAS_DOMAIN"
17-
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<SERVERNAME>" "$HOSTNAME"
18-
1910
exec /usr/sbin/apachectl -DFOREGROUND
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
if [[ ! -e "$WEB_DOCUMENT_ROOT" ]]; then
2+
echo ""
3+
echo "[WARNING] WEB_DOCUMENT_ROOT does not exists with path \"$WEB_DOCUMENT_ROOT\"!"
4+
echo ""
5+
fi
6+
7+
# Replace markers
8+
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_INDEX>" "$WEB_DOCUMENT_INDEX"
9+
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_ROOT>" "$WEB_DOCUMENT_ROOT"
10+
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<ALIAS_DOMAIN>" "$WEB_ALIAS_DOMAIN"
11+
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<SERVERNAME>" "$HOSTNAME"
Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
11
#!/usr/bin/env bash
22
set -e
3+
source /opt/docker/bin/config.sh
34

4-
if [[ ! -e "$WEB_DOCUMENT_ROOT" ]]; then
5-
echo ""
6-
echo "[WARNING] WEB_DOCUMENT_ROOT does not exists with path \"$WEB_DOCUMENT_ROOT\"!"
7-
echo ""
8-
fi
5+
includeScriptDir "/opt/docker/bin/service.d/httpd.d/"
96

107
# Apache gets grumpy about PID files pre-existing
118
rm -f /var/run/httpd/httpd.pid
129

13-
# Replace markers
14-
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_INDEX>" "$WEB_DOCUMENT_INDEX"
15-
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_ROOT>" "$WEB_DOCUMENT_ROOT"
16-
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<ALIAS_DOMAIN>" "$WEB_ALIAS_DOMAIN"
17-
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<SERVERNAME>" "$HOSTNAME"
18-
1910
exec httpd -DFOREGROUND
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
if [[ ! -e "$WEB_DOCUMENT_ROOT" ]]; then
2+
echo ""
3+
echo "[WARNING] WEB_DOCUMENT_ROOT does not exists with path \"$WEB_DOCUMENT_ROOT\"!"
4+
echo ""
5+
fi
6+
7+
# Replace markers
8+
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_INDEX>" "$WEB_DOCUMENT_INDEX"
9+
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_ROOT>" "$WEB_DOCUMENT_ROOT"
10+
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<ALIAS_DOMAIN>" "$WEB_ALIAS_DOMAIN"
11+
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<SERVERNAME>" "$HOSTNAME"
Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,12 @@
11
#!/usr/bin/env bash
22
set -e
33

4-
if [[ ! -e "$WEB_DOCUMENT_ROOT" ]]; then
5-
echo ""
6-
echo "[WARNING] WEB_DOCUMENT_ROOT does not exists with path \"$WEB_DOCUMENT_ROOT\"!"
7-
echo ""
8-
fi
4+
source /opt/docker/bin/config.sh
5+
6+
includeScriptDir "/opt/docker/bin/service.d/httpd.d/"
97

108
# Apache gets grumpy about PID files pre-existing
119
rm -f /var/run/apache2/apache2*.pid
1210

13-
# Replace markers
14-
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_INDEX>" "$WEB_DOCUMENT_INDEX"
15-
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_ROOT>" "$WEB_DOCUMENT_ROOT"
16-
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<ALIAS_DOMAIN>" "$WEB_ALIAS_DOMAIN"
17-
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<SERVERNAME>" "$HOSTNAME"
18-
1911
source /etc/apache2/envvars
2012
exec apache2 -DFOREGROUND -DAPACHE_LOCK_DIR
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
if [[ ! -e "$WEB_DOCUMENT_ROOT" ]]; then
2+
echo ""
3+
echo "[WARNING] WEB_DOCUMENT_ROOT does not exists with path \"$WEB_DOCUMENT_ROOT\"!"
4+
echo ""
5+
fi
6+
7+
# Replace markers
8+
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_INDEX>" "$WEB_DOCUMENT_INDEX"
9+
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_ROOT>" "$WEB_DOCUMENT_ROOT"
10+
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<ALIAS_DOMAIN>" "$WEB_ALIAS_DOMAIN"
11+
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<SERVERNAME>" "$HOSTNAME"
Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,12 @@
11
#!/usr/bin/env bash
22
set -e
33

4-
if [[ ! -e "$WEB_DOCUMENT_ROOT" ]]; then
5-
echo ""
6-
echo "[WARNING] WEB_DOCUMENT_ROOT does not exists with path \"$WEB_DOCUMENT_ROOT\"!"
7-
echo ""
8-
fi
4+
source /opt/docker/bin/config.sh
5+
6+
includeScriptDir "/opt/docker/bin/service.d/httpd.d/"
97

108
# Apache gets grumpy about PID files pre-existing
119
rm -f /var/run/apache2/apache2*.pid
1210

13-
# Replace markers
14-
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_INDEX>" "$WEB_DOCUMENT_INDEX"
15-
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_ROOT>" "$WEB_DOCUMENT_ROOT"
16-
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<ALIAS_DOMAIN>" "$WEB_ALIAS_DOMAIN"
17-
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<SERVERNAME>" "$HOSTNAME"
18-
1911
source /etc/apache2/envvars
2012
exec apache2 -DFOREGROUND -DAPACHE_LOCK_DIR
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
if [[ ! -e "$WEB_DOCUMENT_ROOT" ]]; then
2+
echo ""
3+
echo "[WARNING] WEB_DOCUMENT_ROOT does not exists with path \"$WEB_DOCUMENT_ROOT\"!"
4+
echo ""
5+
fi
6+
7+
# Replace markers
8+
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_INDEX>" "$WEB_DOCUMENT_INDEX"
9+
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_ROOT>" "$WEB_DOCUMENT_ROOT"
10+
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<ALIAS_DOMAIN>" "$WEB_ALIAS_DOMAIN"
11+
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<SERVERNAME>" "$HOSTNAME"
Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,12 @@
11
#!/usr/bin/env bash
22
set -e
33

4-
if [[ ! -e "$WEB_DOCUMENT_ROOT" ]]; then
5-
echo ""
6-
echo "[WARNING] WEB_DOCUMENT_ROOT does not exists with path \"$WEB_DOCUMENT_ROOT\"!"
7-
echo ""
8-
fi
4+
source /opt/docker/bin/config.sh
5+
6+
includeScriptDir "/opt/docker/bin/service.d/httpd.d/"
97

108
# Apache gets grumpy about PID files pre-existing
119
rm -f /var/run/apache2/apache2*.pid
1210

13-
# Replace markers
14-
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_INDEX>" "$WEB_DOCUMENT_INDEX"
15-
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_ROOT>" "$WEB_DOCUMENT_ROOT"
16-
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<ALIAS_DOMAIN>" "$WEB_ALIAS_DOMAIN"
17-
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<SERVERNAME>" "$HOSTNAME"
18-
1911
source /etc/apache2/envvars
2012
exec apache2 -DFOREGROUND -DAPACHE_LOCK_DIR

0 commit comments

Comments
 (0)