-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update with latest upstream commands
- Loading branch information
1 parent
b63c1ef
commit 1c2c30b
Showing
3 changed files
with
5 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,12 @@ | ||
#!/bin/bash | ||
set -ex; | ||
|
||
## Defaults ## | ||
CA_URL=${CA_URL:-none}; | ||
REWRITE_TYPE=${REWRITE_TYPE:-none}; | ||
REWRITE_EXCLUDE=${REWRITE_EXCLUDE:-none}; | ||
|
||
if [ "${CA_URL}" != "none" ];then | ||
/usr/local/bin/cert-updater -p "${CA_URL}"; | ||
else | ||
echo "CA Certificates: Nothing to import, CA_URL is not defined"; | ||
fi | ||
|
||
if [ "${REWRITE_TYPE}" != "none" ];then | ||
echo "Apache Config: REWRITE_TYPE is defined, attempting to add rewrite config to enabled site" | ||
FILE="/usr/local/share/apache2/${REWRITE_TYPE,,}.rewrite" | ||
if [ -f $FILE ];then | ||
sed -i -e "/#REWRITE/{r$FILE" -e "d}" /etc/apache2/sites-enabled/default-ssl.conf | ||
echo "Apache Config: Using rewrite template ${FILE}"; | ||
if [ "${REWRITE_EXCLUDE}" != "none" ];then | ||
echo "Apache Config: REWRITE_EXCLUDE is defined, setting rewrite to ignore the matched pattern ${REWRITE_EXCLUDE}" | ||
sed -i "s@#REWRITE_EXCLUDE@a$(printf %q " RewriteRule ${REWRITE_EXCLUDE} - [L]")@g" /etc/apache2/sites-enabled/default-ssl.conf | ||
fi | ||
fi | ||
else | ||
echo "Apache Config: Using default site without rewrite, REWRITE is not defined" | ||
## Certificates ## | ||
if [ "${CERT_PATH}" != "" ];then | ||
/usr/local/bin/cert-updater; | ||
fi | ||
|
||
exec "$@" | ||
echo "Initialization complete, container ready" | ||
## Initialization ## | ||
/usr/local/bin/app-config; | ||
|
||
apachectl -k start -D FOREGROUND |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.