mirror of
https://github.com/tarampampam/error-pages.git
synced 2024-08-30 18:22:40 +00:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
0efccb0187 | |||
914d6572b7 |
@ -4,6 +4,14 @@ All notable changes to this package will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog][keepachangelog] and this project adheres to [Semantic Versioning][semver].
|
||||
|
||||
## v1.7.1
|
||||
|
||||
### Fixed
|
||||
|
||||
- Random template selecting (thx [@xpliz](https://github.com/xpliz)) [#12]
|
||||
|
||||
[#12]:https://github.com/tarampampam/error-pages/pull/12
|
||||
|
||||
## v1.7.0
|
||||
|
||||
### Added
|
||||
|
@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user