Skip to content

Commit

Permalink
update with latest upstream commands
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonEverling committed Dec 21, 2023
1 parent b63c1ef commit 1c2c30b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 50 deletions.
31 changes: 5 additions & 26 deletions src/usr/local/bin/entrypoint.sh
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
13 changes: 0 additions & 13 deletions src/usr/local/share/apache2/api.rewrite

This file was deleted.

11 changes: 0 additions & 11 deletions src/usr/local/share/apache2/php.rewrite

This file was deleted.

0 comments on commit 1c2c30b

Please sign in to comment.