Skip to content

Commit

Permalink
Merge pull request #209 from cappadona/timezone-override
Browse files Browse the repository at this point in the history
Ensure time zone override applies to Logstash
  • Loading branch information
spujadas committed Jun 17, 2018
2 parents 30ab7ca + 8f3d07d commit 2f33533
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ rm -f /var/run/elasticsearch/elasticsearch.pid /var/run/logstash.pid \
OUTPUT_LOGFILES=""


## override default time zone (Etc/UTC) if TZ variable is set
if [ ! -z "$TZ" ]; then
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
fi


## run pre-hooks
if [ -x /usr/local/bin/elk-pre-hooks.sh ]; then
. /usr/local/bin/elk-pre-hooks.sh
Expand Down

0 comments on commit 2f33533

Please sign in to comment.