mirror of
https://github.com/tarampampam/error-pages.git
synced 2024-08-30 18:22:40 +00:00
Update 100-setup-error-pages.sh (#12)
Random template generator, also picked up `nginx-error-pages` template, which we don't want. Proposing small patch to exclude from `allowed_templates`
This commit is contained in:
parent
455bc21d51
commit
914d6572b7
@ -1,6 +1,11 @@
|
||||
#!/usr/bin/env sh
|
||||
set -e
|
||||
|
||||
# on `docker restart` next directory keep existing: <https://github.com/tarampampam/error-pages/issues/3>
|
||||
if [ -d /opt/html/nginx-error-pages ]; then
|
||||
rm -Rf /opt/html/nginx-error-pages;
|
||||
fi;
|
||||
|
||||
# allows to use random template
|
||||
if [ ! -z "$TEMPLATE_NAME" ] && ([ "$TEMPLATE_NAME" = "random" ] || [ "$TEMPLATE_NAME" = "RANDOM" ]); then
|
||||
# find all templates in directory (only template directories must be located in /opt/html)
|
||||
@ -27,11 +32,6 @@ fi;
|
||||
# allows "direct access" to the error pages using URLs like "/500.html"
|
||||
ln -f -s "/opt/html/$TEMPLATE_NAME/"* /opt/html;
|
||||
|
||||
# on `docker restart` next directory keep existing: <https://github.com/tarampampam/error-pages/issues/3>
|
||||
if [ -d /opt/html/nginx-error-pages ]; then
|
||||
rm -Rf /opt/html/nginx-error-pages;
|
||||
fi;
|
||||
|
||||
# next directory is required for easy nginx `error_page` usage
|
||||
mkdir /opt/html/nginx-error-pages;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user